xs-dev 0.25.10 → 0.25.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ The Moddable SDK and associated dev board tooling is incredibly empowering for e
|
|
|
12
12
|
|
|
13
13
|
[Node.js >= v16](https://nodejs.org/en/)
|
|
14
14
|
|
|
15
|
-
_If you've never installed Node.js before, check out the [getting started guide for xs-dev](https://hipsterbrown.github.io/xs-dev/
|
|
15
|
+
_If you've never installed Node.js before, check out the [getting started guide for xs-dev](https://hipsterbrown.github.io/xs-dev/guide/00-prepare#nodejs-package-manager-optional)._
|
|
16
16
|
|
|
17
17
|
**On Linux:**
|
|
18
18
|
|
|
Binary file
|
|
@@ -77,4 +77,4 @@ Each platform has a variety of features and form factors to support whatever you
|
|
|
77
77
|
|
|
78
78
|
If you run into issues or have a question, please [start a discussion in the GitHub repo](https://github.com/HipsterBrown/xs-dev/discussions).
|
|
79
79
|
|
|
80
|
-
Once you feel ready, [move on the first step of installing the CLI and the Moddable SDK](/
|
|
80
|
+
Once you feel ready, [move on the first step of installing the CLI and the Moddable SDK](/guide/01-hello-console/).
|
|
@@ -7,7 +7,7 @@ description: How to set up the basic development environment and run your first
|
|
|
7
7
|
|
|
8
8
|
## Install the CLI
|
|
9
9
|
|
|
10
|
-
`xs-dev` can be installed globally using the [NodeJS package manager of your choice](
|
|
10
|
+
`xs-dev` can be installed globally using the [NodeJS package manager of your choice](http://localhost:3000/guide/00-prepare#nodejs--package-manager-optional).
|
|
11
11
|
|
|
12
12
|
```
|
|
13
13
|
npm install -g xs-dev
|
|
@@ -23,7 +23,7 @@ yarn global add xs-dev
|
|
|
23
23
|
|
|
24
24
|
## Setup system tooling
|
|
25
25
|
|
|
26
|
-
As specified in the [setup documentation](
|
|
26
|
+
As specified in the [setup documentation](/features/setup/), the [Moddable SDK and associated tooling](https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/tools/tools.md) is installed using the following command:
|
|
27
27
|
|
|
28
28
|
```
|
|
29
29
|
xs-dev setup
|
|
@@ -53,7 +53,7 @@ As a next step, try running the "helloworld example" in the Moddable Command Pro
|
|
|
53
53
|
|
|
54
54
|
To start a new terminal session, you can either execute your shell of choice (`bash`/`zsh`/`fish`), create a new terminal window / tab, or start the Moddable Command Prompt on Windows. This will ensure the expected tooling is available in your session [PATH](https://en.wikipedia.org/wiki/PATH_(variable)).
|
|
55
55
|
|
|
56
|
-
You can [run any Moddable example included in the SDK](
|
|
56
|
+
You can [run any Moddable example included in the SDK](/features/run#moddable-examples). The "Hello World" example provides the simplest program to get started and can be run in the [simulator](https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/tools/tools.md#simulator):
|
|
57
57
|
|
|
58
58
|
```
|
|
59
59
|
xs-dev run --example helloworld
|
|
@@ -61,7 +61,7 @@ xs-dev run --example helloworld
|
|
|
61
61
|
|
|
62
62
|
This will start up the debugger and simulator:
|
|
63
63
|
|
|
64
|
-

|
|
64
|
+

|
|
65
65
|
|
|
66
66
|
This will keep running until interrupted using the `Ctrl+C` keys in the terminal session or both apps are quit.
|
|
67
67
|
|
|
@@ -69,7 +69,7 @@ This will keep running until interrupted using the `Ctrl+C` keys in the terminal
|
|
|
69
69
|
|
|
70
70
|
Use the `--list-examples` flag with the `run` command to search the extensive list of available examples to run in the simulator: `xs-dev run --list-examples`
|
|
71
71
|
|
|
72
|
-
When you're ready to move on, it's time to [create your first project and control some hardware](/
|
|
72
|
+
When you're ready to move on, it's time to [create your first project and control some hardware](/guide/02-blinky).
|
|
73
73
|
|
|
74
74
|
## Troubleshooting
|
|
75
75
|
|
|
@@ -79,7 +79,7 @@ When attempting to run the Hello World example, if you continually see the follo
|
|
|
79
79
|
Moddable tooling required. Run 'xs-dev setup --device <computer os here>' before trying again.
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
There may be an issue with the terminal shell or command prompt using the correct [environment configuration](/
|
|
82
|
+
There may be an issue with the terminal shell or command prompt using the correct [environment configuration](/features/setup#overview) for xs-dev.
|
|
83
83
|
|
|
84
84
|
- [Learn about Terminal profiles on MacOS](https://support.apple.com/guide/terminal/default-startup-terminal-window-profiles-trml5856b1f2/mac)
|
|
85
85
|
- [Learn about shell initialization files and user profiles on Linux](https://www.tecmint.com/understanding-shell-initialization-files-and-user-profiles-linux/)
|
|
@@ -92,7 +92,7 @@ env | grep MODDABLE
|
|
|
92
92
|
```
|
|
93
93
|
The above command should return something like `MODDABLE=/Users/<username>/.local/share/moddable` to indicate where the Moddable SDK has been installed in the filesystem.
|
|
94
94
|
|
|
95
|
-
Running [`xs-dev doctor` command](/
|
|
95
|
+
Running [`xs-dev doctor` command](/features/doctor) will display relevant info about the development environment, which can be helpful for debugging and sharing in support issues:
|
|
96
96
|
|
|
97
97
|
```
|
|
98
98
|
xs-dev environment info:
|
|
@@ -7,7 +7,7 @@ description: Initialize a new project and start to interact with some hardware!
|
|
|
7
7
|
|
|
8
8
|
## Project creation
|
|
9
9
|
|
|
10
|
-
The [`init` command](/
|
|
10
|
+
The [`init` command](/features/init) will create a new directory with the name provided and saffold the starting files based on a template or example:
|
|
11
11
|
|
|
12
12
|
```
|
|
13
13
|
xs-dev init guiding-light
|
|
@@ -20,7 +20,7 @@ Generating Moddable project: guiding-light
|
|
|
20
20
|
Run the project using: cd guiding-light && xs-dev run
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
The `guiding-light` directory should contain `main.js` and `manifest.json` files. `main.js` contains that was run from the [Hello Console example](/
|
|
23
|
+
The `guiding-light` directory should contain `main.js` and `manifest.json` files. `main.js` contains that was run from the [Hello Console example](/guide/01-hello-console#run-the-hello-world-example):
|
|
24
24
|
|
|
25
25
|
```javascript
|
|
26
26
|
debugger;
|
|
@@ -53,15 +53,15 @@ The [`include` field](https://github.com/Moddable-OpenSource/moddable/blob/publi
|
|
|
53
53
|
|
|
54
54
|
The [`modules` field](https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/tools/manifest.md#modules) should contain a mapping of every module to include in the build. The `*` key means the module (or list of modules) can be imported and referenced by their file name. A custom key can be used as an alias to reference when importing the assigned module.
|
|
55
55
|
|
|
56
|
-
Executing `xs-dev run` should provide the same experience as the [Hello Console guide](/
|
|
56
|
+
Executing `xs-dev run` should provide the same experience as the [Hello Console guide](/guide/01-hello-console).
|
|
57
57
|
|
|
58
|
-
_Quick tip: check out all the available simulators by using the [`--list-devices` flag](/
|
|
58
|
+
_Quick tip: check out all the available simulators by using the [`--list-devices` flag](/features/run#select-a-device-target) with the `run` command and typing "simulator" to filter the list._
|
|
59
59
|
|
|
60
60
|
## Down to the metal
|
|
61
61
|
|
|
62
|
-
At this point, we have our [chosen hardware in hand](/
|
|
62
|
+
At this point, we have our [chosen hardware in hand](/guide/00-prepare#choose-your-hardware-adventure) and need to set up the dev environment to start running code on the device.
|
|
63
63
|
|
|
64
|
-
Just like the [previous step](/
|
|
64
|
+
Just like the [previous step](/guide/01-hello-console#setup-system-tooling), the `setup` command will automate the installation and building of tooling required for the target device. The `--list-devices` flag will provide an interactive list of supported device platforms:
|
|
65
65
|
|
|
66
66
|
```
|
|
67
67
|
❯ xs-dev setup --list-devices
|
|
@@ -101,7 +101,7 @@ Now that we know we can run code on our device, it is time to shed a little ligh
|
|
|
101
101
|
xs-dev include io
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
The [`include` command](/
|
|
104
|
+
The [`include` command](/features/include) updates the `manifest.json` to (you guessed it) _include_ the required module(s) from the Moddable SDK. In this case, the `io` module provides the complete set of ECMA-419 APIs for the supported device platform. The `manifest.json` should look like this:
|
|
105
105
|
|
|
106
106
|
```json
|
|
107
107
|
{
|