create-crank 0.1.0 → 0.1.1
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 +7 -7
- package/bin/create.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ Create a new [Crank.js](https://crank.js.org) project.
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm create crank
|
|
8
|
+
npm create crank
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
This is a shortcut for:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm create shovel
|
|
14
|
+
npm create shovel --template crank
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Options
|
|
@@ -20,13 +20,13 @@ All options are passed through to `create-shovel`:
|
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
# Skip TypeScript prompt
|
|
23
|
-
npm create crank
|
|
24
|
-
npm create crank
|
|
23
|
+
npm create crank --typescript
|
|
24
|
+
npm create crank --no-typescript
|
|
25
25
|
|
|
26
26
|
# Skip platform prompt
|
|
27
|
-
npm create crank
|
|
28
|
-
npm create crank
|
|
29
|
-
npm create crank
|
|
27
|
+
npm create crank --platform node
|
|
28
|
+
npm create crank --platform bun
|
|
29
|
+
npm create crank --platform cloudflare
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## What you get
|
package/bin/create.js
CHANGED
|
@@ -3,15 +3,15 @@ import {spawn} from "child_process";
|
|
|
3
3
|
|
|
4
4
|
const args = process.argv.slice(2);
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
if (!args.includes("--
|
|
8
|
-
args.push("--
|
|
6
|
+
// Always use Crank framework
|
|
7
|
+
if (!args.includes("--framework")) {
|
|
8
|
+
args.push("--framework", "crank");
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
// Run create-shovel with the args
|
|
12
|
-
|
|
11
|
+
// Run create-shovel with the args. --yes skips the second install prompt
|
|
12
|
+
// (the user already confirmed installing create-crank).
|
|
13
|
+
spawn("npx", ["--yes", "create-shovel", ...args], {
|
|
13
14
|
stdio: "inherit",
|
|
14
|
-
shell: true,
|
|
15
15
|
}).on("exit", (code) => {
|
|
16
16
|
process.exit(code ?? 0);
|
|
17
17
|
});
|