Skip to content

Commit

Permalink
docs: fix broken links (thanks @phoddie)
Browse files Browse the repository at this point in the history
  • Loading branch information
HipsterBrown committed Jun 16, 2023
1 parent 4cc0403 commit 61df3e3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/dist
cname: xs-dev.js.org


4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
branches:
- main
paths-ignore:
- 'docs/**'

env:
CI: true
Expand Down Expand Up @@ -62,3 +64,5 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}




Binary file added docs/src/assets/run-hello-world.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/content/docs/guide/00-prepare.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ Each platform has a variety of features and form factors to support whatever you

If you run into issues or have a question, please [start a discussion in the GitHub repo](https://github.com/HipsterBrown/xs-dev/discussions).

Once you feel ready, [move on the first step of installing the CLI and the Moddable SDK](/en/guide/01-hello-console).
Once you feel ready, [move on the first step of installing the CLI and the Moddable SDK](/guide/01-hello-console/).
14 changes: 7 additions & 7 deletions docs/src/content/docs/guide/01-hello-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: How to set up the basic development environment and run your first

## Install the CLI

`xs-dev` can be installed globally using the [NodeJS package manager of your choice](./00-prepare#nodejs-package-manager-optional).
`xs-dev` can be installed globally using the [NodeJS package manager of your choice](http://localhost:3000/guide/00-prepare#nodejs--package-manager-optional).

```
npm install -g xs-dev
Expand All @@ -23,7 +23,7 @@ yarn global add xs-dev

## Setup system tooling

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:
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:

```
xs-dev setup
Expand Down Expand Up @@ -53,23 +53,23 @@ As a next step, try running the "helloworld example" in the Moddable Command Pro

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)).

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):
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):

```
xs-dev run --example helloworld
```

This will start up the debugger and simulator:

![Moddable simulator app and debugger app running on MacOS](/run-hello-world.png)
![Moddable simulator app and debugger app running on MacOS](../../../assets/run-hello-world.png)

This will keep running until interrupted using the `Ctrl+C` keys in the terminal session or both apps are quit.

## Keep exploring!

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`

When you're ready to move on, it's time to [create your first project and control some hardware](/en/guide/02-blinky).
When you're ready to move on, it's time to [create your first project and control some hardware](/guide/02-blinky).

## Troubleshooting

Expand All @@ -79,7 +79,7 @@ When attempting to run the Hello World example, if you continually see the follo
Moddable tooling required. Run 'xs-dev setup --device <computer os here>' before trying again.
```

There may be an issue with the terminal shell or command prompt using the correct [environment configuration](/xs-dev/en/features/setup#overview) for xs-dev.
There may be an issue with the terminal shell or command prompt using the correct [environment configuration](/features/setup#overview) for xs-dev.

- [Learn about Terminal profiles on MacOS](https://support.apple.com/guide/terminal/default-startup-terminal-window-profiles-trml5856b1f2/mac)
- [Learn about shell initialization files and user profiles on Linux](https://www.tecmint.com/understanding-shell-initialization-files-and-user-profiles-linux/)
Expand All @@ -92,7 +92,7 @@ env | grep MODDABLE
```
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.

Running [`xs-dev doctor` command](/en/features/doctor) will display relevant info about the development environment, which can be helpful for debugging and sharing in support issues:
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:

```
xs-dev environment info:
Expand Down
14 changes: 7 additions & 7 deletions docs/src/content/docs/guide/02-blinky.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Initialize a new project and start to interact with some hardware!

## Project creation

The [`init` command](/en/features/init) will create a new directory with the name provided and saffold the starting files based on a template or example:
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:

```
xs-dev init guiding-light
Expand All @@ -20,7 +20,7 @@ Generating Moddable project: guiding-light
Run the project using: cd guiding-light && xs-dev run
```

The `guiding-light` directory should contain `main.js` and `manifest.json` files. `main.js` contains that was run from the [Hello Console example](/en/guide/02-hello-console):
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):

```javascript
debugger;
Expand Down Expand Up @@ -53,15 +53,15 @@ The [`include` field](https://github.com/Moddable-OpenSource/moddable/blob/publi

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.

Executing `xs-dev run` should provide the same experience as the [Hello Console guide](/en/guide/01-hello-console).
Executing `xs-dev run` should provide the same experience as the [Hello Console guide](/guide/01-hello-console).

_Quick tip: check out all the available simulators by using the [`--list-devices` flag](/en/features/run#select-a-device-target) with the `run` command and typing "simulator" to filter the list._
_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._

## Down to the metal

At this point, we have our [chosen hardware in hand](/en/guide/00-prepare#choose-your-hardware-adventure) and need to set up the dev environment to start running code on the device.
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.

Just like the [previous step](/en/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:
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:

```
❯ xs-dev setup --list-devices
Expand Down Expand Up @@ -101,7 +101,7 @@ Now that we know we can run code on our device, it is time to shed a little ligh
xs-dev include io
```

The [`include` command](/en/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:
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:

```json
{
Expand Down

0 comments on commit 61df3e3

Please sign in to comment.