You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs site is published at [stackpress.io/idea](https://www.stackpress.io/idea/).
31
30
32
-
Before running install, build, lint, or test commands:
31
+
## Tooling
33
32
34
-
```bash
35
-
node -v
36
-
```
33
+
Use Node.js `>=22` for work in this package.
37
34
38
-
If the active version is below Node 22, try `nvm` first:
35
+
Before running Node-based commands, verify that the selected `node` binary is version `22` or higher.
39
36
40
-
```bash
41
-
command -v nvm
42
-
export NVM_DIR="$HOME/.nvm"
43
-
[ -s"$NVM_DIR/nvm.sh" ] &&."$NVM_DIR/nvm.sh"
44
-
nvm use 22
45
-
node -v
46
-
```
37
+
Use this lookup order:
38
+
39
+
1. Check whether `nvm` is installed.
40
+
2. If `nvm` is installed, try to locate the NVM versions directory and prefer a Node `22+` binary from there.
41
+
3. If the NVM directory cannot be located directly, try to use `nvm` itself to select or inspect a Node `22+` install.
42
+
4. If `nvm` cannot be used, look for `node` in common OS-specific install paths.
43
+
5. If common install paths do not contain Node `22+`, inspect environment variables such as `PATH`, `NVM_DIR`, and other Node-related environment variables.
44
+
6. If Node `22+` still cannot be found, stop and ask the user for the Node binary location before proceeding.
47
45
48
-
If Node 22+ still cannot be resolved, stop and ask the user for the
49
-
correct `nvm` location or required Node binary path.
46
+
Do not assume that the default `node` on `PATH` satisfies this requirement.
50
47
51
-
Root dependencies are managed with`yarn`.
48
+
Root dependencies use`yarn`.
52
49
53
-
Common root commands:
50
+
Common commands:
54
51
55
52
```bash
56
53
yarn build
57
54
yarn test
58
55
yarn test:parser
59
56
yarn test:transformer
60
57
yarn transform
58
+
yarn build:docs
61
59
```
62
60
63
-
Package-specific commands:
61
+
Package-specific:
64
62
65
63
```bash
66
64
yarn --cwd packages/idea-parser build
@@ -71,8 +69,7 @@ yarn --cwd packages/idea build
71
69
yarn --cwd example build
72
70
```
73
71
74
-
The `language/` extension is not part of the root Yarn workspace. Manage
75
-
it from inside `language/`:
72
+
The `language/` extension is not part of the root workspace:
76
73
77
74
```bash
78
75
cd language && npm install
@@ -81,47 +78,26 @@ cd language && npm run lint
81
78
cd language && npm test
82
79
```
83
80
84
-
## Editing Guidance
85
-
86
-
- Prefer changes in `src/` and tests first, then rebuild only the
87
-
affected package if needed.
88
-
- Keep parser and transformer changes covered by tests in their
89
-
respective `tests/` directories.
90
-
- When changing package exports or CLI behavior, verify the relevant
91
-
`package.json` entries still match emitted output.
92
-
- The root workspace includes `packages/*` and `example`; `language` is
93
-
separate and does not share the root workspace `node_modules`.
94
-
- Do not run installs or validation on Node versions below 22.
95
-
96
-
## Documentation Guidance
97
-
98
-
Check existing docs before adding new conventions:
0 commit comments