Skip to content

Commit

Permalink
docs: change runtime page order
Browse files Browse the repository at this point in the history
  • Loading branch information
Avivbens committed Jun 7, 2024
1 parent 510044e commit a564853
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions docs/app/setup/runtime-explain.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ In order to use `fast-alfred` runtime, you have to configure your package as ESM
Add `"type": "module"` to your `package.json` file.
:::

## How It Works

At build time, an additional asset, named `run-node.sh` would be attached to the workflow, under the `assets` directory.
This script is responsible for executing the bundled Node.js script.

### Example

::: tip TIP :zap:
The code below is an example of how to trigger your Node.js script in an Alfred Script Filter.
:::

```bash
./esbuild/assets/run-node.sh esbuild/your-script-under-main.js "$1"
```

#### DEMO

![Runtime Example](/runtime-example.jpeg)

## Local Debugging

Sometimes, we just want to run scripts locally, and put some debugger breakpoints to understand the flow.
Expand Down Expand Up @@ -51,22 +70,3 @@ right from your IDE.

**You can place your breakpoints and debug your script from your .ts file.**
:::

## How It Works

At build time, an additional asset, named `run-node.sh` would be attached to the workflow, under the `assets` directory.
This script is responsible for executing the bundled Node.js script.

### Example

::: tip TIP :zap:
The code below is an example of how to trigger your Node.js script in an Alfred Script Filter.
:::

```bash
./esbuild/assets/run-node.sh esbuild/your-script-under-main.js "$1"
```

#### DEMO

![Runtime Example](/runtime-example.jpeg)

0 comments on commit a564853

Please sign in to comment.