create-dokio 0.1.14 → 0.1.15

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
@@ -6,10 +6,10 @@ CLI scaffold for Dokio hub repos and templates. Generates correct file structure
6
6
 
7
7
  ```bash
8
8
  # Interactive — prompts for everything
9
- npx create-dokio
9
+ npx --yes create-dokio@latest
10
10
 
11
11
  # Pre-fill the template name
12
- npx create-dokio pool-care
12
+ npx --yes create-dokio@latest pool-care
13
13
  ```
14
14
 
15
15
  > Using pnpm? `pnpm dlx create-dokio`
@@ -25,22 +25,24 @@ Run from your **repos workspace folder** — the folder where all your hub repos
25
25
  **Always use `@latest` to get the newest version:**
26
26
 
27
27
  ```bash
28
- npx create-dokio@latest
28
+ npx --yes create-dokio@latest
29
29
  ```
30
30
 
31
- **Check what version you're running:**
31
+ The `--yes` flag skips the "Ok to proceed?" install prompt.
32
+
33
+ **Check what version is available on npm:**
32
34
 
33
35
  ```bash
34
- npx create-dokio@latest --version
36
+ npm show create-dokio version
35
37
  ```
36
38
 
37
- **Check what version is available on npm:**
39
+ **Check what version you have cached:**
38
40
 
39
41
  ```bash
40
- npm show create-dokio version
42
+ npx create-dokio@latest --version
41
43
  ```
42
44
 
43
- > If Jake tells you there's an update, just swap `npx create-dokio` → `npx create-dokio@latest` and you're on the new version immediately. No install step needed.
45
+ > If Jake tells you there's an update, run `npx --yes create-dokio@latest` and you're on the new version immediately.
44
46
 
45
47
  ---
46
48
 
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  // src/index.ts
4
4
  import prompts3 from "prompts";
5
5
  import kleur6 from "kleur";
6
+ import { createRequire } from "module";
6
7
 
7
8
  // src/template.ts
8
9
  import { join as join3 } from "path";
@@ -1306,7 +1307,13 @@ Run \`create-dokio template\` from inside this repo.
1306
1307
  }
1307
1308
 
1308
1309
  // src/index.ts
1310
+ var require2 = createRequire(import.meta.url);
1309
1311
  async function main(argv) {
1312
+ if (argv.includes("--version") || argv.includes("-v")) {
1313
+ const { version } = require2("../package.json");
1314
+ console.log(version);
1315
+ process.exit(0);
1316
+ }
1310
1317
  const subcommand = argv[0];
1311
1318
  if (subcommand === "template") {
1312
1319
  return runTemplate(argv[1]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-dokio",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "CLI scaffold for Dokio templates",
5
5
  "type": "module",
6
6
  "bin": {