create-crust 0.0.21 → 0.0.23
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
CHANGED
|
@@ -23,7 +23,23 @@ Every generated project includes:
|
|
|
23
23
|
- `README.md` — getting started instructions
|
|
24
24
|
- `.gitignore` — sensible defaults for Node/Bun projects
|
|
25
25
|
|
|
26
|
-
Generated templates can be configured for either standalone binary distribution
|
|
26
|
+
Generated templates can be configured for either standalone binary distribution or Bun runtime package distribution during scaffolding.
|
|
27
|
+
|
|
28
|
+
For standalone binary projects, the intended workflow is:
|
|
29
|
+
|
|
30
|
+
1. `bun run build` — raw binaries (`crust build`)
|
|
31
|
+
2. `bun run package` — npm-ready staged packages in `dist/npm` (`crust build --package`)
|
|
32
|
+
3. `bun run publish` — publish the staged packages (`crust publish`)
|
|
33
|
+
|
|
34
|
+
The binary templates intentionally keep `build` and `package` as separate scripts because they do different jobs:
|
|
35
|
+
|
|
36
|
+
- `build` is for raw binary artifacts.
|
|
37
|
+
- `package` is for npm packaging (alias for `crust build --package`).
|
|
38
|
+
- `publish` is for registry upload.
|
|
39
|
+
|
|
40
|
+
If you need public build-time constants, `crust build` can use Bun's cwd env by default or explicit `--env-file` inputs.
|
|
41
|
+
|
|
42
|
+
> **Note:** The template's top-level `package.json` has `"files": ["dist"]` and `"bin"` pointing to `dist/cli` for local development. When publishing via `crust publish`, the staged packages in `dist/npm/` each have their own `package.json` with the correct `files` and `bin` entries — the top-level fields are not used for npm distribution.
|
|
27
43
|
|
|
28
44
|
## Documentation
|
|
29
45
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-crust",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Scaffold a new Crust CLI project.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
"build": "bunup",
|
|
38
38
|
"dev": "bunup --watch",
|
|
39
39
|
"check:types": "tsc --noEmit",
|
|
40
|
-
"test": "bun test"
|
|
40
|
+
"test": "bun test",
|
|
41
|
+
"publish": "bun publish --no-git-checks || true"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@crustjs/core": "0.0.
|
|
44
|
+
"@crustjs/core": "0.0.14",
|
|
44
45
|
"@crustjs/create": "0.0.4",
|
|
45
46
|
"@crustjs/prompts": "0.0.9"
|
|
46
47
|
},
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI built with Crust",
|
|
6
6
|
"files": [
|
|
7
|
-
"dist"
|
|
7
|
+
"dist/cli",
|
|
8
|
+
"dist/cli.cmd",
|
|
9
|
+
"dist/*-bun-*"
|
|
8
10
|
],
|
|
9
11
|
"bin": {
|
|
10
12
|
"{{name}}": "dist/cli"
|
|
@@ -12,7 +14,8 @@
|
|
|
12
14
|
"scripts": {
|
|
13
15
|
"dev": "bun run src/cli.ts",
|
|
14
16
|
"build": "crust build",
|
|
15
|
-
"
|
|
17
|
+
"package": "crust build --package",
|
|
18
|
+
"publish": "crust publish --stage-dir dist/npm",
|
|
16
19
|
"start": "./dist/cli",
|
|
17
20
|
"check:types": "tsc --noEmit"
|
|
18
21
|
},
|
|
@@ -17,12 +17,15 @@ bun run build
|
|
|
17
17
|
|
|
18
18
|
This template supports two distribution modes:
|
|
19
19
|
|
|
20
|
-
- **Standalone binaries (recommended)**:
|
|
20
|
+
- **Standalone binaries (recommended)**: use `bun run build` for raw binaries, then `bun run package` for npm-ready staged packages.
|
|
21
21
|
- **Bun runtime package**: distribute with runtime dependencies (`@crustjs/core` and `@crustjs/plugins` in `dependencies`).
|
|
22
22
|
|
|
23
23
|
## Publishing
|
|
24
24
|
|
|
25
|
-
- **Standalone binaries**:
|
|
25
|
+
- **Standalone binaries**:
|
|
26
|
+
`bun run build` produces raw binaries.
|
|
27
|
+
`bun run package` stages npm packages in `dist/npm/`.
|
|
28
|
+
`bun run publish` publishes the staged packages in manifest order.
|
|
26
29
|
- **Bun runtime package**: keep `bin` -> `dist/cli.js`, build with Bun (`bun build ... --outfile dist/cli.js`), and keep runtime deps in `dependencies`.
|
|
27
30
|
|
|
28
31
|
## Usage
|
|
@@ -19,12 +19,15 @@ bun run build
|
|
|
19
19
|
|
|
20
20
|
This template supports two distribution modes:
|
|
21
21
|
|
|
22
|
-
- **Standalone binaries (recommended)**:
|
|
22
|
+
- **Standalone binaries (recommended)**: use `bun run build` for raw binaries, then `bun run package` for npm-ready staged packages.
|
|
23
23
|
- **Bun runtime package**: distribute with runtime dependencies (`@crustjs/core` and `@crustjs/plugins` in `dependencies`).
|
|
24
24
|
|
|
25
25
|
## Publishing
|
|
26
26
|
|
|
27
|
-
- **Standalone binaries**:
|
|
27
|
+
- **Standalone binaries**:
|
|
28
|
+
`bun run build` produces raw binaries.
|
|
29
|
+
`bun run package` stages npm packages in `dist/npm/`.
|
|
30
|
+
`bun run publish` publishes the staged packages in manifest order.
|
|
28
31
|
- **Bun runtime package**: keep `bin` -> `dist/cli.js`, build with Bun (`bun build ... --outfile dist/cli.js`), and keep runtime deps in `dependencies`.
|
|
29
32
|
|
|
30
33
|
## Usage
|