Packages
DeviceScript supports packages published in npm or any other package manager compatible
with the package.json specification.
Currently, only TypeScript code can be published - in future we may add services.
Builtin Packages
The packages are dropped by the DeviceScript compiler whenever you run build.
They do not need to be npm installed.
@devicescript/core- the core package exposing the C runtime and Jacdac services@devicescript/server- support for writing Jacdac servers in DeviceScript@devicescript/test- testing framework@devicescript/observables- reactive observables@devicescript/graphics- images, etc.@devicescript/crypto- AES, SHA on Buffers@devicescript/cloud- development gateway@devicescript/i2c- interacting with I2C peripherals@devicescript/spi- interacting with SPI peripherals@devicescript/net- TCP and TLS sockets@devicescript/gpio- working with GPIO pins@devicescript/runtime- runtime utilities@devicescript/settings- reading/writing settings in flash memory@devicescript/drivers- driver implementations
NPM packages
Search for
devicescripton npmjs.com. By convention, DeviceScript-compatible packages should be marked with thedevicescriptkeyword.Search for the
devicescripttopic on GitHub By convention, DeviceScript-compatible packages should be tagged withdevicescript.Add the package using npm:
- npm
- Yarn
- pnpm
npm install --save package-name
yarn add package-name
pnpm add package-name
GitHub releases
- Search for the
devicescripttopic on GitHub By convention, DeviceScript-compatible packages should be tagged withdevicescript. - Add the release using npm:
- npm
- Yarn
- pnpm
npm install --save owner/repo#release
yarn add owner/repo#release
pnpm add owner/repo#release
Custom packages
Users can create and package their own DeviceScript packages to share their code with others.
- Follow the custom package guide.