Skip to content

Commit 12224be

Browse files
authored
Merge pull request #1297 from joshunrau/serve-instrument
add serve-instrument to docs
2 parents a4e61c9 + 6bf8823 commit 12224be

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/en/3-guides/3.0-how-to-create-an-instrument.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ sidebar:
88
import { Steps } from '@astrojs/starlight/components';
99
import Screenshot from '@/components/common/Screenshot.astro';
1010

11+
There are two ways to create and test an instrument:
12+
13+
- **Instrument Playground**: create, validate, and upload your instrument in the browser.
14+
- **Local Development (CLI)**: run an instrument folder on your machine using `@opendatacapture/serve-instrument`.
15+
16+
## Instrument Playground (Recommended)
17+
1118
### Steps
1219

1320
<Steps>
@@ -31,3 +38,21 @@ import Screenshot from '@/components/common/Screenshot.astro';
3138
<Screenshot alt="upload bundle form" name="upload-bundle" />
3239

3340
</Steps>
41+
42+
## Local Development (CLI)
43+
44+
To use the CLI you must have **Node.js** installed on your machine.
45+
46+
Install the CLI globally:
47+
48+
```bash
49+
npm install -g @opendatacapture/serve-instrument
50+
```
51+
52+
Then run it against your instrument folder containing an entrypoint (index.tsx, index.jsx, index.ts, index.js):
53+
54+
```bash
55+
serve-instrument ./path/to/instrument
56+
```
57+
58+
The server watches the instrument directory and rebuilds automatically when files change (refresh the browser to load the latest bundle).

0 commit comments

Comments
 (0)