create-dokio 0.1.13 → 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 +30 -2
- package/dist/index.js +7 -0
- package/package.json +1 -1
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`
|
|
@@ -18,6 +18,34 @@ Run from your **repos workspace folder** — the folder where all your hub repos
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
## Keeping up to date
|
|
22
|
+
|
|
23
|
+
`npx` caches packages locally, so `npx create-dokio` may run an old version even after an update is published.
|
|
24
|
+
|
|
25
|
+
**Always use `@latest` to get the newest version:**
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx --yes create-dokio@latest
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The `--yes` flag skips the "Ok to proceed?" install prompt.
|
|
32
|
+
|
|
33
|
+
**Check what version is available on npm:**
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm show create-dokio version
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Check what version you have cached:**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx create-dokio@latest --version
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
> If Jake tells you there's an update, run `npx --yes create-dokio@latest` and you're on the new version immediately.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
21
49
|
## Commands
|
|
22
50
|
|
|
23
51
|
### `create-dokio hub`
|
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]);
|