xs-dev
v1.0.2
Published
CLI for automating the setup and usage of Moddable XS tools
Readme
CLI for automating the setup and usage of Moddable XS tools
The Moddable SDK and associated dev board tooling is incredibly empowering for embedded JS hardware development, however the set up process can be tedious to follow when getting started. This project aims to streamline the install and environment configuration requirements across platforms in just a few commands.
This project is a work in progress and currently pre-1.0, so there may be breaking changes.
Requirements
Node.js, at least the active LTS version.
If you've never installed Node.js before, check out the getting started guide for xs-dev.
XZ utils are required to install the CLI due to a dependency for decompressing the ARM toolchain used for nrf52 development.
It can be installed with Homebrew on MacOS:
brew install xzOr as xz-utils on Linux distributions like Ubunutu:
apt-get install xz-utilsOn Linux:
Setup commands rely on ssh-askpass to prompt for permission when installing other tools and dependencies.
Install
npm install -g xs-devpnpm install -g xs-devyarn global add xs-devUpdate to latest release
npm update -g xs-devpnpm update -g xs-devyarn global upgrade xs-devFeatures & Usage
Check out the docs to learn about using xs-dev and getting started with embedded JS development.
Development
Clone the project and install dependencies. We're using pnpm and volta to manage packages and Node.
git clone https://github.com/HipsterBrown/xs-dev.git
cd xs-dev
pnpm installLink dev version of CLI using pnpm, which will override any other globally installed version:
pnpm link --global
pnpm link --global xs-devOr create an alias to clearly denote the local version of the CLI:
alias local-xs-dev=$PWD/bin/xs-devTo maintain the alias between shell sessions, for example I use zsh:
echo "alias local-xs-dev=$PWD/bin/xs-dev" >> ~/.zshrcDocs
The documentation site is built with Astro with the Starlight template and can be found in the docs/ directory. When working on them locally, run pnpm start:docs to start the development server that watches for file changes and reloads the page.
🚀 Docs Project Structure
Inside of your Astro + Starlight project, you'll see the following folders and files:
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.jsonStarlight looks for .md or .mdx files in the src/content/docs/ directory. Each file is exposed as a route based on its file name.
Images can be added to src/assets/ and embedded in Markdown with a relative link.
Static assets, like favicons, can be placed in the public/ directory.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
