@kitschpatrol/create-project 1.0.4 → 1.1.0
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/dist/index.js +15 -10
- package/package.json +9 -7
- package/readme.md +6 -0
- package/templates/cli/.npmrc +3 -0
- package/templates/cli/.vscode/settings.json +2 -2
- package/templates/cli/mdat.config.ts +6 -1
- package/templates/cli/package.json +8 -6
- package/templates/cli/pnpm-lock.yaml +1512 -0
- package/templates/cli/src/index.ts +8 -0
- package/templates/cli+library/.npmrc +3 -0
- package/templates/cli+library/.vscode/settings.json +2 -2
- package/templates/cli+library/mdat.config.ts +6 -1
- package/templates/cli+library/package.json +10 -8
- package/templates/cli+library/src/bin/cli.ts +11 -3
- package/templates/cli+library/src/lib/index.ts +6 -0
- package/templates/cli+library/src/lib/log.ts +16 -0
- package/templates/cli+library/tsconfig.build.json +0 -3
- package/templates/electron/.github/workflows/github-release.yml +81 -0
- package/templates/electron/.github/workflows/set-github-metadata.yml +21 -0
- package/templates/{cli+library/node_modules/.pnpm/@kitschpatrol+repo-config@5.7.4_@types+node@20.19.21_typescript@5.9.3/node_modules/@kitschpatrol/repo-config/init → electron}/.gitignore +2 -0
- package/templates/{web/node_modules/.pnpm/@kitschpatrol+repo-config@5.7.4_@types+node@20.19.21_typescript@5.9.3/node_modules/@kitschpatrol/repo-config/init → electron}/.npmrc +3 -0
- package/templates/electron/.prettierignore +8 -0
- package/templates/electron/.remarkrc.js +8 -0
- package/templates/electron/.vscode/extensions.json +9 -0
- package/templates/electron/.vscode/settings.json +68 -0
- package/templates/electron/cspell.config.js +5 -0
- package/templates/electron/electron/electron-env.d.ts +29 -0
- package/templates/electron/electron/main.ts +50 -0
- package/templates/electron/electron/preload.ts +130 -0
- package/templates/electron/electron/resources/icons/mac/icon.icns +0 -0
- package/templates/electron/electron/resources/icons/png/1024x1024.png +0 -0
- package/templates/electron/electron/resources/icons/win/icon.ico +0 -0
- package/templates/electron/electron/resources/mac/entitlements.mac.plist +11 -0
- package/templates/electron/electron-builder.ts +40 -0
- package/templates/electron/eslint.config.ts +22 -0
- package/templates/electron/index.html +13 -0
- package/templates/electron/knip.config.ts +3 -0
- package/templates/electron/license.txt +21 -0
- package/templates/electron/mdat.config.ts +3 -0
- package/templates/electron/package.json +61 -0
- package/templates/electron/pnpm-workspace.yaml +4 -0
- package/templates/electron/prettier.config.js +3 -0
- package/templates/electron/public/vite.svg +35 -0
- package/templates/electron/readme.md +29 -0
- package/templates/electron/src/counter.ts +15 -0
- package/templates/electron/src/main.ts +27 -0
- package/templates/electron/src/style.css +102 -0
- package/templates/electron/src/typescript.svg +14 -0
- package/templates/electron/stylelint.config.js +3 -0
- package/templates/electron/tsconfig.json +9 -0
- package/templates/electron/vite.config.ts +15 -0
- package/templates/library/.npmrc +3 -0
- package/templates/library/.vscode/settings.json +2 -2
- package/templates/library/package.json +10 -9
- package/templates/library/src/index.ts +6 -0
- package/templates/library/src/log.ts +16 -0
- package/templates/library/tsconfig.build.json +0 -3
- package/templates/minimal/.npmrc +3 -0
- package/templates/minimal/.vscode/settings.json +2 -2
- package/templates/minimal/package.json +3 -3
- package/templates/minimal/tsconfig.build.json +0 -3
- package/templates/web/.npmrc +3 -0
- package/templates/web/.vscode/settings.json +2 -2
- package/templates/web/package.json +4 -4
- package/templates/cli+library/node_modules/.pnpm/@kitschpatrol+repo-config@5.7.4_@types+node@20.19.21_typescript@5.9.3/node_modules/@kitschpatrol/repo-config/init/.npmrc +0 -13
- package/templates/cli+library/node_modules/.pnpm/@kitschpatrol+shared-config@5.7.4_@types+estree@1.0.8_@types+node@20.19.21_@typescript-_2447bd682c28a4894c15b76c356f369c/node_modules/@kitschpatrol/repo-config/init/.npmrc +0 -13
- package/templates/cli+library/node_modules/@kitschpatrol/repo-config/init/.npmrc +0 -13
- package/templates/cli+library/pnpm-lock.yaml +0 -10094
- package/templates/web/node_modules/.pnpm/@kitschpatrol+repo-config@5.7.4_@types+node@20.19.21_typescript@5.9.3/node_modules/@kitschpatrol/repo-config/init/.gitignore +0 -22
- package/templates/web/node_modules/.pnpm/@kitschpatrol+shared-config@5.7.4_@types+estree@1.0.8_@types+node@20.19.21_@typescript-_2447bd682c28a4894c15b76c356f369c/node_modules/@kitschpatrol/repo-config/init/.npmrc +0 -13
- package/templates/web/node_modules/@kitschpatrol/repo-config/init/.npmrc +0 -13
- package/templates/web/pnpm-lock.yaml +0 -10213
package/dist/index.js
CHANGED
|
@@ -3553,23 +3553,28 @@ const pipelineType = ZodPipeline.create;
|
|
|
3553
3553
|
|
|
3554
3554
|
//#endregion
|
|
3555
3555
|
//#region src/template.ts
|
|
3556
|
+
const TEMPLATE_TYPES = [
|
|
3557
|
+
"minimal",
|
|
3558
|
+
"web",
|
|
3559
|
+
"cli",
|
|
3560
|
+
"library",
|
|
3561
|
+
"cli+library",
|
|
3562
|
+
"electron"
|
|
3563
|
+
];
|
|
3556
3564
|
var template_default = createTemplate({
|
|
3557
|
-
about: {
|
|
3565
|
+
about: {
|
|
3566
|
+
description: "Create a new TypeScript library, CLI, or web project with Kitschpatrol's shared configuration.",
|
|
3567
|
+
name: "Create Kitschpatrol Project"
|
|
3568
|
+
},
|
|
3558
3569
|
options: {
|
|
3559
|
-
type: enumType(
|
|
3560
|
-
"minimal",
|
|
3561
|
-
"web",
|
|
3562
|
-
"cli",
|
|
3563
|
-
"library",
|
|
3564
|
-
"cli+library"
|
|
3565
|
-
]).default("minimal").describe("The type of project to create"),
|
|
3570
|
+
type: enumType(TEMPLATE_TYPES).default("minimal").describe("The type of project to create"),
|
|
3566
3571
|
"author-name": stringType().default("Eric Mika").describe("The name of the author"),
|
|
3567
3572
|
"author-email": stringType().default("eric@ericmika.com").describe("The email of the author"),
|
|
3568
3573
|
"author-url": stringType().default("https://ericmika.com").describe("The URL of the author"),
|
|
3569
3574
|
"cli-command-name": stringType().default("new-project").describe("CLI command name (if applicable)"),
|
|
3570
3575
|
"github-owner": stringType().default("kitschpatrol").describe("The owner of the future repository"),
|
|
3571
3576
|
"github-repository": stringType().default(`new-project`).describe("The name of the future repository / package"),
|
|
3572
|
-
"npm-
|
|
3577
|
+
"npm-auth-command": stringType().default("op read 'op://Personal/npm/token'").describe("A shell command that sets the NPM_AUTH_TOKEN env variable with a granular token for publishing to npm")
|
|
3573
3578
|
},
|
|
3574
3579
|
async produce(params) {
|
|
3575
3580
|
const { options } = params;
|
|
@@ -3580,7 +3585,7 @@ var template_default = createTemplate({
|
|
|
3580
3585
|
"package.json": await handlebars(path.join(import.meta.dirname, `../templates/${options.type}/package.json`), options)
|
|
3581
3586
|
},
|
|
3582
3587
|
scripts: [{
|
|
3583
|
-
commands: [
|
|
3588
|
+
commands: options.type === "electron" ? ["pnpm install", "pnpm run fix"] : [
|
|
3584
3589
|
"pnpm install",
|
|
3585
3590
|
"pnpm run build",
|
|
3586
3591
|
"pnpm run fix"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/create-project",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Kitschpatrol's TypeScript project templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -33,12 +33,13 @@
|
|
|
33
33
|
"bingo-handlebars": "^0.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@kitschpatrol/shared-config": "^5.
|
|
37
|
-
"@types/node": "^20.19.
|
|
36
|
+
"@kitschpatrol/shared-config": "^5.8.0",
|
|
37
|
+
"@types/node": "^20.19.24",
|
|
38
38
|
"bumpp": "^10.3.1",
|
|
39
|
-
"
|
|
39
|
+
"taze": "^19.9.0",
|
|
40
|
+
"tsdown": "^0.15.12",
|
|
40
41
|
"typescript": "~5.9.3",
|
|
41
|
-
"vitest": "^
|
|
42
|
+
"vitest": "^4.0.6",
|
|
42
43
|
"zod": "^3.25.76"
|
|
43
44
|
},
|
|
44
45
|
"engines": {
|
|
@@ -52,7 +53,8 @@
|
|
|
52
53
|
"clean": "git rm -f pnpm-lock.yaml ; git clean -fdX",
|
|
53
54
|
"fix": "ksc fix",
|
|
54
55
|
"lint": "ksc lint",
|
|
55
|
-
"release": "bumpp --commit 'Release: %s' && pnpm run build &&
|
|
56
|
-
"test": "vitest run"
|
|
56
|
+
"release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"update-templates": "for dir in ./templates/*; do taze -w --cwd \"$dir\"; done"
|
|
57
59
|
}
|
|
58
60
|
}
|
package/readme.md
CHANGED
|
@@ -73,6 +73,12 @@ Kitschpatrol Create Project options:
|
|
|
73
73
|
--github-repository (string): The name of the future repository / package.
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
## Development Notes
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
./dist/index.js --directory ~/Desktop/test
|
|
80
|
+
```
|
|
81
|
+
|
|
76
82
|
## Maintainers
|
|
77
83
|
|
|
78
84
|
[@kitschpatrol](https://github.com/kitschpatrol)
|
package/templates/cli/.npmrc
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"explorer.fileNesting.enabled": true,
|
|
3
3
|
"explorer.fileNesting.expand": false,
|
|
4
4
|
"explorer.fileNesting.patterns": {
|
|
5
|
-
"*.js": "
|
|
6
|
-
"*.ts": "
|
|
5
|
+
"*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
|
|
6
|
+
"*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
|
|
7
7
|
".env": ".env.*",
|
|
8
8
|
"package.json": ".*ignore, .*rc, .*.js, .*.mjs, .*.cjs, .*.ts, .*.mts, .*.cts, .*.json, .*.jsonc, .*.json5, .*.yml, .*.yaml, *config.js, *config.mjs, *config.cjs, *config.ts, *config.mts, *config.cts, *config.json, *config.jsonc, *config.json5, *config.yml, *config.yaml, pnpm*, workspace*, yarn*, lerna.json, netlify.toml, package-lock.json, turbo.json, vercel.json, wrangler.toml, yarn.lock",
|
|
9
9
|
"readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
|
|
@@ -30,21 +30,23 @@
|
|
|
30
30
|
"clean": "git rm -f pnpm-lock.yaml ; git clean -fdX",
|
|
31
31
|
"fix": "ksc fix",
|
|
32
32
|
"lint": "ksc lint",
|
|
33
|
-
"release": "bumpp --commit 'Release: %s' && pnpm run build &&
|
|
33
|
+
"release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$({{npm-auth-command}}) && pnpm publish",
|
|
34
34
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@types/node": "^20.19.
|
|
38
|
-
"@types/yargs": "^17.0.
|
|
37
|
+
"@types/node": "^20.19.24",
|
|
38
|
+
"@types/yargs": "^17.0.34",
|
|
39
|
+
"lognow": "^0.2.1",
|
|
39
40
|
"yargs": "^17.7.2"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@kitschpatrol/shared-config": "^5.
|
|
43
|
+
"@kitschpatrol/shared-config": "^5.8.0",
|
|
43
44
|
"bumpp": "^10.3.1",
|
|
44
|
-
"
|
|
45
|
+
"mdat-plugin-cli-help": "^1.0.1",
|
|
46
|
+
"tsdown": "^0.15.12",
|
|
45
47
|
"typescript": "~5.9.3"
|
|
46
48
|
},
|
|
47
|
-
"packageManager": "pnpm@10.
|
|
49
|
+
"packageManager": "pnpm@10.20.0",
|
|
48
50
|
"engines": {
|
|
49
51
|
"node": ">=20.19.0"
|
|
50
52
|
},
|