inferative 0.1.0 → 0.2.0-next.20261014162827
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 +10 -8
- package/dist/bin.mjs +3585 -1026
- package/dist/index.d.mts +2 -120
- package/dist/index.mjs +1 -1
- package/package.json +15 -17
- package/dist/init-command-C2q2dkCV.mjs +0 -878
package/README.md
CHANGED
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
The Inferative command line. It is on public npm, ships built JavaScript and runs under plain `node` (version 24 or
|
|
4
4
|
later). It has the command `init`, which creates a project, and the group `site`: the commands a website runs against
|
|
5
|
-
its channel.
|
|
5
|
+
its channel. To start a project, run `npm create inferative@latest my-site`: that command needs no registry setting.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
|
|
8
|
+
npm create inferative@latest my-site
|
|
9
9
|
npx inferative site --help
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
## What a site needs first
|
|
13
13
|
|
|
14
14
|
The command line itself comes from public npm. Its dependencies, the `@inferative/*` packages and the `@heximon/*`
|
|
15
|
-
packages they use, come from GitHub Packages. So `npx inferative` works in a folder where npm can read both
|
|
15
|
+
packages they use, come from GitHub Packages. So `npx inferative site` works in a folder where npm can read both
|
|
16
|
+
scopes. Creating a project does not need them: use `npm create inferative@latest` for that.
|
|
16
17
|
|
|
17
18
|
```ini
|
|
18
19
|
@inferative:registry=https://npm.pkg.github.com
|
|
@@ -25,11 +26,12 @@ lines to add for the first scope that fails.
|
|
|
25
26
|
|
|
26
27
|
## `inferative init`
|
|
27
28
|
|
|
28
|
-
`inferative init [directory]` creates a project from a starter.
|
|
29
|
-
[`create-inferative`](../create-inferative)
|
|
29
|
+
`inferative init [directory]` creates a project from a starter. The command lives in
|
|
30
|
+
[`create-inferative`](../create-inferative), which this package depends on, and `npm create inferative@latest` runs it
|
|
31
|
+
with nothing else installed. Both names take the same flags.
|
|
30
32
|
|
|
31
33
|
```sh
|
|
32
|
-
|
|
34
|
+
npm create inferative@latest my-site
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
| Argument or flag | What it does |
|
|
@@ -43,7 +45,7 @@ npx inferative init my-site
|
|
|
43
45
|
|
|
44
46
|
The target folder must not exist, or must be empty. The command never overwrites a file. The package name is the
|
|
45
47
|
base name of the folder. A named folder must have a valid npm name: lowercase letters, digits, and `.` `_` `-`. The
|
|
46
|
-
current folder keeps its name on disk, so the command changes the name to a valid one (`My Site` becomes `my-site`).
|
|
48
|
+
current folder keeps its name on disk, so the command changes the name to a valid one (`My Site` becomes `my-site`, `Café` becomes `cafe`).
|
|
47
49
|
|
|
48
50
|
The command does these steps in this order:
|
|
49
51
|
|
|
@@ -89,7 +91,7 @@ file, and a missing file is not an error. The agent skill (`docs/skills/inferati
|
|
|
89
91
|
## How it is built
|
|
90
92
|
|
|
91
93
|
`vp pack` bundles `src/bin.ts` into `dist/bin.mjs`, and `src/index.ts` into `dist/index.mjs`. The index is the library
|
|
92
|
-
entry: it exports `InitCommand`, which `create-inferative
|
|
94
|
+
entry: it exports `InitCommand`, which it re-exports from `create-inferative`. The pack bundles the `@inferative/*` subpaths that
|
|
93
95
|
map to raw TypeScript (`core`, `utils`), because Node cannot load those from `node_modules`. Every other
|
|
94
96
|
`@inferative/*` and `@heximon/*` import stays external and appears in `dependencies`. That way the command line and the site it reads
|
|
95
97
|
share one copy of each `./api` and `./config` module. `deps.onlyImport` in `vite.config.ts` fails the build when the
|