@genroc/eval-node 0.0.0-edge.aff7b37 → 0.0.0-edge.d8176a7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/bin/import.mjs +1 -1
- package/import.ts +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,9 +11,8 @@ Script tasks for Node. Two halves with different jobs:
|
|
|
11
11
|
|
|
12
12
|
npm i -D @genroc/eval-node
|
|
13
13
|
|
|
14
|
-
Then register the resolver in a
|
|
15
|
-
|
|
16
|
-
on the cwd:
|
|
14
|
+
Then register the resolver in a `genroc.yaml` beside your definitions — discovery walks up from
|
|
15
|
+
the file, so nothing depends on the cwd:
|
|
17
16
|
|
|
18
17
|
resolvers:
|
|
19
18
|
import:
|
|
@@ -187,7 +186,7 @@ never touches the queue and the worker never runs it; the two halves share this
|
|
|
187
186
|
because they share a calling convention, which is exactly the coupling that breaks silently
|
|
188
187
|
if they version apart.
|
|
189
188
|
|
|
190
|
-
Register it in the project's
|
|
189
|
+
Register it in the project's `genroc.yaml`:
|
|
191
190
|
|
|
192
191
|
```yaml
|
|
193
192
|
resolvers:
|
package/bin/import.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// npm `bin` entries need a shebang and a stable extension; Node's type stripping handles the
|
|
3
|
-
// .ts behind it. .
|
|
3
|
+
// .ts behind it. genroc.yaml points here: command: [npx, genroc-import]
|
|
4
4
|
import "../import.ts";
|
package/import.ts
CHANGED
|
@@ -51,7 +51,7 @@ async function exists(path: string): Promise<boolean> {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
/** Creates the parent directory, which `.genroc
|
|
54
|
+
/** Creates the parent directory, which `.genroc/` relies on: nothing else makes it. */
|
|
55
55
|
async function write(path: string, content: string): Promise<void> {
|
|
56
56
|
await mkdir(dirname(path), { recursive: true });
|
|
57
57
|
await writeFile(path, content);
|
|
@@ -197,9 +197,7 @@ async function nearestTsconfig(from: string, root: string): Promise<string | nul
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
async function typecheck(root: string, sites: Site[]): Promise<void> {
|
|
200
|
-
|
|
201
|
-
// coexist with it. The suffix is what keeps the scratch area out of its way.
|
|
202
|
-
const dir = join(root, ".genroc-cache");
|
|
200
|
+
const dir = join(root, ".genroc");
|
|
203
201
|
await write(join(dir, ".gitignore"), "*\n");
|
|
204
202
|
|
|
205
203
|
// One tsc per distinct base config: `extends` takes a single base, so merging two would
|