Prepare for embedded JS development
Tutorial content will reference command line utilities and jargon as part of the workflow for developing embedded JS projects. Select your operating system to learn more about this subject:
Inline terminal commands will usually be formatting like the following:
echo "hello world"
Code examples will look like the following:
These are not the only available editors, so feel free to do your own research and pick what feels right to you!
NodeJS & Package Manager (optional)
Node can be downloaded directly from the website, however using one of the following version managers can help with quickly switching to recommended versions of the tooling in the future:
Node comes with npm as the included package manager, but there are other options available if needed:
If you encounter an
EACCES error after setting up NodeJS and attempt to install a package, like the following:
Error: EACCES: permission denied, mkdir
Check out the npm docs to learn about to resolve it: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
Setup commands rely on
ssh-askpass to prompt for permission when installing other tools and dependencies.
Choose your hardware adventure
Hardware is not required to get started with xs-dev, or even to run some code, since there are simulated devices available with the Moddable SDK.
xs-dev supports a few popular hardware platforms through Moddable:
Each platform has a variety of features and form factors to support whatever you might dream up. This guide will do its best to provide code and diagrams that match the expectations of your chosen device(s) but cannot promise comprehensive coverage of every piece of hardware in existence.
If you run into issues or have a question, please start a discussion in the GitHub repo.
Once you feel ready, move on the first step of installing the CLI and the Moddable SDK.