diff --git a/docs/app/quick-start.md b/docs/app/quick-start.md index 99c4f07..b98c712 100755 --- a/docs/app/quick-start.md +++ b/docs/app/quick-start.md @@ -28,6 +28,8 @@ module.exports = {} 1. Create a Workflow via Alfred UI, or use an existing one 1. Open the Workflow directory, copy relevant files (icons, `info.plist`, `prefs.plist`, etc) to your project +1. Set `"type": "module"` in your `package.json` file - this is required for + using [`fast-alfred` runtime](./setup/runtime-explain) 1. Create a source directory for your Workflow scripts ```bash @@ -40,7 +42,7 @@ You can import every external script from this directory regularly. See more [here](./setup/bundler-options#productionscripts) ::: -4. Use [`fast-alfred` client](./client/client.md) utilities to manage your Workflow +5. Use [`fast-alfred` client](./client/client.md) utilities to manage your Workflow 1. Follow the [bundling guidelines](./setup/versioning-bundling) to bundle your scripts 1. Call your scripts using [`fast-alfred` runtime](./setup/runtime-explain) diff --git a/docs/app/setup/runtime-explain.md b/docs/app/setup/runtime-explain.md index 7f11b70..f3b232c 100644 --- a/docs/app/setup/runtime-explain.md +++ b/docs/app/setup/runtime-explain.md @@ -9,6 +9,11 @@ next: true The main advantage of this approach is that your Node.js script would be executed in an environment that is aware of the Alfred workflow, and it will be able to interact with it, as well as having caching and other features. +::: warning NOTE :rotating_light: +In order to use `fast-alfred` runtime, you have to configure your package as ESM module. +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.