@kitschpatrol/create-project 1.1.3 → 1.2.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.
Files changed (54) hide show
  1. package/dist/index.js +23 -3
  2. package/package.json +7 -6
  3. package/readme.md +15 -0
  4. package/templates/cli/license.txt +1 -1
  5. package/templates/cli/package.json +15 -15
  6. package/templates/cli+library/license.txt +1 -1
  7. package/templates/cli+library/package.json +15 -15
  8. package/templates/electron/cspell.config.js +1 -1
  9. package/templates/electron/electron-builder.ts +2 -0
  10. package/templates/electron/eslint.config.ts +1 -0
  11. package/templates/electron/knip.config.ts +3 -1
  12. package/templates/electron/license.txt +1 -1
  13. package/templates/electron/package.json +15 -15
  14. package/templates/electron/tsconfig.json +1 -1
  15. package/templates/library/license.txt +1 -1
  16. package/templates/library/package.json +12 -12
  17. package/templates/minimal/license.txt +1 -1
  18. package/templates/minimal/package.json +11 -11
  19. package/templates/unplugin/.github/workflows/github-release.yml +81 -0
  20. package/templates/unplugin/.github/workflows/set-github-metadata.yml +21 -0
  21. package/templates/unplugin/.gitignore +22 -0
  22. package/templates/unplugin/.npmrc +16 -0
  23. package/templates/unplugin/.prettierignore +8 -0
  24. package/templates/unplugin/.remarkrc.js +8 -0
  25. package/templates/unplugin/.vscode/extensions.json +9 -0
  26. package/templates/unplugin/.vscode/settings.json +68 -0
  27. package/templates/unplugin/cspell.config.js +3 -0
  28. package/templates/unplugin/eslint.config.ts +11 -0
  29. package/templates/unplugin/knip.config.ts +5 -0
  30. package/templates/unplugin/license.txt +21 -0
  31. package/templates/unplugin/mdat.config.ts +3 -0
  32. package/templates/unplugin/package.json +85 -0
  33. package/templates/unplugin/pnpm-workspace.yaml +3 -0
  34. package/templates/unplugin/prettier.config.js +3 -0
  35. package/templates/unplugin/readme.md +27 -0
  36. package/templates/unplugin/src/api.ts +2 -0
  37. package/templates/unplugin/src/core/options.ts +28 -0
  38. package/templates/unplugin/src/esbuild.ts +22 -0
  39. package/templates/unplugin/src/farm.ts +22 -0
  40. package/templates/unplugin/src/index.ts +27 -0
  41. package/templates/unplugin/src/rolldown.ts +22 -0
  42. package/templates/unplugin/src/rollup.ts +22 -0
  43. package/templates/unplugin/src/rspack.ts +22 -0
  44. package/templates/unplugin/src/vite.ts +22 -0
  45. package/templates/unplugin/src/webpack.ts +24 -0
  46. package/templates/unplugin/stylelint.config.js +3 -0
  47. package/templates/unplugin/tests/__snapshots__/rollup.test.ts.snap +10 -0
  48. package/templates/unplugin/tests/fixtures/basic.js +1 -0
  49. package/templates/unplugin/tests/rollup.test.ts +16 -0
  50. package/templates/unplugin/tsconfig.build.json +5 -0
  51. package/templates/unplugin/tsconfig.json +7 -0
  52. package/templates/unplugin/tsdown.config.ts +7 -0
  53. package/templates/web/license.txt +1 -1
  54. package/templates/web/package.json +12 -12
package/dist/index.js CHANGED
@@ -3559,7 +3559,8 @@ const TEMPLATE_TYPES = [
3559
3559
  "cli",
3560
3560
  "library",
3561
3561
  "cli+library",
3562
- "electron"
3562
+ "electron",
3563
+ "unplugin"
3563
3564
  ];
3564
3565
  var template_default = createTemplate({
3565
3566
  about: {
@@ -3578,11 +3579,30 @@ var template_default = createTemplate({
3578
3579
  },
3579
3580
  async produce(params) {
3580
3581
  const { options } = params;
3582
+ const extraOptions = {
3583
+ ...options,
3584
+ year: (/* @__PURE__ */ new Date()).getFullYear()
3585
+ };
3586
+ async function handlebarsHelper(...paths) {
3587
+ const result = {};
3588
+ for (const filePath of paths) result[filePath] = await handlebars(path.join(import.meta.dirname, `../templates/${options.type}/${filePath}`), extraOptions);
3589
+ return result;
3590
+ }
3581
3591
  return {
3582
3592
  files: {
3583
3593
  ...await intakeDirectory(path.join(import.meta.dirname, `../templates/${options.type}`), { exclude: /node_modules|pnpm-lock\.yaml/ }),
3584
- "license.txt": await handlebars(path.join(import.meta.dirname, `../templates/${options.type}/license.txt`), options),
3585
- "package.json": await handlebars(path.join(import.meta.dirname, `../templates/${options.type}/package.json`), options)
3594
+ ...await handlebarsHelper("license.txt", "package.json", ...options.type === "unplugin" ? [
3595
+ "src/esbuild.ts",
3596
+ "src/farm.ts",
3597
+ "src/index.ts",
3598
+ "src/rolldown.ts",
3599
+ "src/rollup.ts",
3600
+ "src/rspack.ts",
3601
+ "src/vite.ts",
3602
+ "src/webpack.ts",
3603
+ "src/webpack.ts",
3604
+ "tests/__snapshots__/rollup.test.ts.snap"
3605
+ ] : [])
3586
3606
  },
3587
3607
  scripts: [{
3588
3608
  commands: options.type === "electron" ? ["pnpm install", "pnpm run fix"] : [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/create-project",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
4
4
  "description": "Kitschpatrol's TypeScript project templates.",
5
5
  "keywords": [
6
6
  "cli",
@@ -33,13 +33,14 @@
33
33
  "bingo-handlebars": "^0.1.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@kitschpatrol/shared-config": "^5.8.1",
37
- "@types/node": "^20.19.24",
36
+ "@kitschpatrol/shared-config": "^5.8.3",
37
+ "@types/node": "~20.19.24",
38
38
  "bumpp": "^10.3.1",
39
+ "mdat": "^1.2.3",
39
40
  "taze": "^19.9.0",
40
- "tsdown": "^0.16.0",
41
+ "tsdown": "^0.16.1",
41
42
  "typescript": "~5.9.3",
42
- "vitest": "^4.0.7",
43
+ "vitest": "^4.0.8",
43
44
  "zod": "^3.25.76"
44
45
  },
45
46
  "engines": {
@@ -52,7 +53,7 @@
52
53
  "build": "tsdown --no-fixed-extension",
53
54
  "clean": "git rm -f pnpm-lock.yaml ; git clean -fdX",
54
55
  "fix": "ksc fix",
55
- "lint": "ksc lint",
56
+ "lint": "ksc-repo lint ; mdat readme check readme.md ; ksc-typescript lint ; ksc-eslint lint ; ksc-stylelint lint ; ksc-cspell lint ; ksc-knip lint ; ksc-prettier lint",
56
57
  "release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish",
57
58
  "test": "vitest run",
58
59
  "update-templates": "for dir in ./templates/*; do taze -w --cwd \"$dir\"; done"
package/readme.md CHANGED
@@ -102,3 +102,18 @@ Thanks to [Josh Goldberg](https://www.joshuakgoldberg.com/) for creating the [Bi
102
102
  [MIT](license.txt) © Eric Mika
103
103
 
104
104
  <!-- /license -->
105
+
106
+ ---
107
+
108
+ Test scratch:
109
+
110
+ Build failures:
111
+
112
+ - electron
113
+
114
+ Lint failures:
115
+
116
+ - electron
117
+ - cli+library
118
+ - cli
119
+ - library
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 {{author-name}}
3
+ Copyright (c) {{{year}}} {{{author-name}}}
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,26 +1,26 @@
1
1
  {
2
- "name": "{{github-repository}}",
2
+ "name": "{{{github-repository}}}",
3
3
  "version": "0.0.0",
4
- "description": "A {{type}} project.",
4
+ "description": "A {{{type}}} project.",
5
5
  "keywords": [
6
6
  "cli",
7
7
  "npm-package"
8
8
  ],
9
- "homepage": "https://github.com/{{github-owner}}/{{github-repository}}",
10
- "bugs": "https://github.com/{{github-owner}}/{{github-repository}}/issues",
9
+ "homepage": "https://github.com/{{{github-owner}}}/{{{github-repository}}}",
10
+ "bugs": "https://github.com/{{{github-owner}}}/{{{github-repository}}}/issues",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git+https://github.com/{{futureGitHubOwner}}/{{github-repository}}.git"
13
+ "url": "git+https://github.com/{{{github-owner}}}/{{{github-repository}}}.git"
14
14
  },
15
15
  "license": "MIT",
16
16
  "author": {
17
- "name": "{{author-name}}",
18
- "email": "{{author-email}}",
19
- "url": "{{author-url}}"
17
+ "name": "{{{author-name}}}",
18
+ "email": "{{{author-email}}}",
19
+ "url": "{{{author-url}}}"
20
20
  },
21
21
  "type": "module",
22
22
  "bin": {
23
- "{{cli-command-name}}": "dist/index.js"
23
+ "{{{cli-command-name}}}": "dist/index.js"
24
24
  },
25
25
  "files": [
26
26
  "dist/*"
@@ -30,20 +30,20 @@
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 && NPM_AUTH_TOKEN=$({{npm-auth-command}}) && pnpm publish",
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.24",
37
+ "@types/node": "~20.19.24",
38
38
  "@types/yargs": "^17.0.34",
39
- "lognow": "^0.3.1",
40
- "yargs": "^17.7.2"
39
+ "lognow": "^0.3.2",
40
+ "yargs": "^18.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@kitschpatrol/shared-config": "^5.8.1",
43
+ "@kitschpatrol/shared-config": "^5.8.3",
44
44
  "bumpp": "^10.3.1",
45
45
  "mdat-plugin-cli-help": "^1.0.2",
46
- "tsdown": "^0.16.0",
46
+ "tsdown": "^0.16.1",
47
47
  "typescript": "~5.9.3"
48
48
  },
49
49
  "packageManager": "pnpm@10.20.0",
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 {{author-name}}
3
+ Copyright (c) {{{year}}} {{{author-name}}}
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,22 +1,22 @@
1
1
  {
2
- "name": "{{github-repository}}",
2
+ "name": "{{{github-repository}}}",
3
3
  "version": "0.0.0",
4
- "description": "A {{type}} project.",
4
+ "description": "A {{{type}}} project.",
5
5
  "keywords": [
6
6
  "cli",
7
7
  "npm-package"
8
8
  ],
9
- "homepage": "https://github.com/{{github-owner}}/{{github-repository}}",
10
- "bugs": "https://github.com/{{github-owner}}/{{github-repository}}/issues",
9
+ "homepage": "https://github.com/{{{github-owner}}}/{{{github-repository}}}",
10
+ "bugs": "https://github.com/{{{github-owner}}}/{{{github-repository}}}/issues",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git+https://github.com/{{github-owner}}/{{github-repository}}.git"
13
+ "url": "git+https://github.com/{{{github-owner}}}/{{{github-repository}}}.git"
14
14
  },
15
15
  "license": "MIT",
16
16
  "author": {
17
- "name": "{{author-name}}",
18
- "email": "{{author-email}}",
19
- "url": "{{author-url}}"
17
+ "name": "{{{author-name}}}",
18
+ "email": "{{{author-email}}}",
19
+ "url": "{{{author-url}}}"
20
20
  },
21
21
  "type": "module",
22
22
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "main": "./dist/lib/index.js",
29
29
  "module": "./dist/lib/index.js",
30
30
  "bin": {
31
- "{{cli-command-name}}": "dist/bin/cli.js"
31
+ "{{{cli-command-name}}}": "dist/bin/cli.js"
32
32
  },
33
33
  "files": [
34
34
  "dist/*"
@@ -38,20 +38,20 @@
38
38
  "clean": "git rm -f pnpm-lock.yaml ; git clean -fdX",
39
39
  "fix": "ksc fix",
40
40
  "lint": "ksc lint",
41
- "release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$({{npm-auth-command}}) && pnpm publish",
41
+ "release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$({{{npm-auth-command}}}) && pnpm publish",
42
42
  "test": "echo \"Error: no test specified\" && exit 1"
43
43
  },
44
44
  "dependencies": {
45
- "@types/node": "^20.19.24",
45
+ "@types/node": "~20.19.24",
46
46
  "@types/yargs": "^17.0.34",
47
- "lognow": "^0.3.1",
48
- "yargs": "^17.7.2"
47
+ "lognow": "^0.3.2",
48
+ "yargs": "^18.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@kitschpatrol/shared-config": "^5.8.1",
51
+ "@kitschpatrol/shared-config": "^5.8.3",
52
52
  "bumpp": "^10.3.1",
53
53
  "mdat-plugin-cli-help": "^1.0.2",
54
- "tsdown": "^0.16.0",
54
+ "tsdown": "^0.16.1",
55
55
  "typescript": "~5.9.3"
56
56
  },
57
57
  "packageManager": "pnpm@10.20.0",
@@ -1,5 +1,5 @@
1
1
  import { cspellConfig } from '@kitschpatrol/cspell-config'
2
2
 
3
3
  export default cspellConfig({
4
- words: ['asar', 'nsis'],
4
+ words: ['nsis'],
5
5
  })
@@ -15,6 +15,8 @@ const config: Configuration = {
15
15
  entitlementsInherit: 'electron/resources/mac/entitlements.mac.plist',
16
16
  gatekeeperAssess: false,
17
17
  hardenedRuntime: true,
18
+ // Delete this when you're ready to sign the app
19
+ identity: null,
18
20
  icon: 'electron/resources/icons/mac/icon.icns',
19
21
  target: 'zip',
20
22
  },
@@ -15,6 +15,7 @@ export default eslintConfig({
15
15
  ],
16
16
  },
17
17
  ],
18
+ 'unicorn/no-null': 'off',
18
19
  'unicorn/no-process-exit': 'off',
19
20
  },
20
21
  },
@@ -1,3 +1,5 @@
1
1
  import { knipConfig } from '@kitschpatrol/knip-config'
2
2
 
3
- export default knipConfig()
3
+ export default knipConfig({
4
+ entry: ['electron-builder.ts', 'electron/preload.ts', 'src/main.ts', 'electron/main.ts'],
5
+ })
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 {{author-name}}
3
+ Copyright (c) {{{year}}} {{{author-name}}}
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,22 +1,22 @@
1
1
  {
2
- "name": "{{github-repository}}",
2
+ "name": "{{{github-repository}}}",
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
- "description": "An {{type}} project.",
5
+ "description": "An {{{type}}} project.",
6
6
  "keywords": [
7
- "{{type}}"
7
+ "{{{type}}}"
8
8
  ],
9
- "homepage": "https://github.com/{{github-owner}}/{{github-repository}}",
10
- "bugs": "https://github.com/{{github-owner}}/{{github-repository}}/issues",
9
+ "homepage": "https://github.com/{{{github-owner}}}/{{{github-repository}}}",
10
+ "bugs": "https://github.com/{{{github-owner}}}/{{{github-repository}}}/issues",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git+https://github.com/{{github-owner}}/{{github-repository}}.git"
13
+ "url": "git+https://github.com/{{{github-owner}}}/{{{github-repository}}}.git"
14
14
  },
15
15
  "license": "MIT",
16
16
  "author": {
17
- "name": "{{author-name}}",
18
- "email": "{{author-email}}",
19
- "url": "{{author-url}}"
17
+ "name": "{{{author-name}}}",
18
+ "email": "{{{author-email}}}",
19
+ "url": "{{{author-url}}}"
20
20
  },
21
21
  "type": "module",
22
22
  "main": "dist-electron/main.js",
@@ -30,16 +30,16 @@
30
30
  "test": "echo \"Error: no test specified\" && exit 1"
31
31
  },
32
32
  "dependencies": {
33
- "@types/node": "^20.19.24",
34
- "lognow": "^0.2.2"
33
+ "@types/node": "~22.19.0",
34
+ "lognow": "^0.3.2"
35
35
  },
36
36
  "devDependencies": {
37
- "@kitschpatrol/shared-config": "^5.8.1",
37
+ "@kitschpatrol/shared-config": "^5.8.3",
38
38
  "bumpp": "^10.3.1",
39
- "electron": "^38.5.0",
39
+ "electron": "^39.1.1",
40
40
  "electron-builder": "^26.0.12",
41
41
  "typescript": "~5.9.3",
42
- "vite": "npm:rolldown-vite@7.1.17",
42
+ "vite": "npm:rolldown-vite@7.2.2",
43
43
  "vite-plugin-electron": "^0.29.0"
44
44
  },
45
45
  "packageManager": "pnpm@10.20.0",
@@ -55,7 +55,7 @@
55
55
  "unrs-resolver"
56
56
  ],
57
57
  "overrides": {
58
- "vite": "npm:rolldown-vite@7.1.17"
58
+ "vite": "npm:rolldown-vite@7.2.2"
59
59
  }
60
60
  }
61
61
  }
@@ -5,5 +5,5 @@
5
5
  },
6
6
  // Includes project dot-files files for typescript-eslint integration
7
7
  "include": ["**/*", "**/**.*"],
8
- "exclude": ["**/dist/", "**/bin/"]
8
+ "exclude": ["**/bin/", "**/dist/", "**/dist-electron/"]
9
9
  }
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 {{author-name}}
3
+ Copyright (c) {{{year}}} {{{author-name}}}
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,21 +1,21 @@
1
1
  {
2
- "name": "{{github-repository}}",
2
+ "name": "{{{github-repository}}}",
3
3
  "version": "0.0.0",
4
- "description": "A {{type}} project.",
4
+ "description": "A {{{type}}} project.",
5
5
  "keywords": [
6
6
  "npm-package"
7
7
  ],
8
- "homepage": "https://github.com/{{github-owner}}/{{github-repository}}",
9
- "bugs": "https://github.com/{{github-owner}}/{{github-repository}}/issues",
8
+ "homepage": "https://github.com/{{{github-owner}}}/{{{github-repository}}}",
9
+ "bugs": "https://github.com/{{{github-owner}}}/{{{github-repository}}}/issues",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "git+https://github.com/{{github-owner}}/{{github-repository}}.git"
12
+ "url": "git+https://github.com/{{{github-owner}}}/{{{github-repository}}}.git"
13
13
  },
14
14
  "license": "MIT",
15
15
  "author": {
16
- "name": "{{author-name}}",
17
- "email": "{{author-email}}",
18
- "url": "{{author-url}}"
16
+ "name": "{{{author-name}}}",
17
+ "email": "{{{author-email}}}",
18
+ "url": "{{{author-url}}}"
19
19
  },
20
20
  "type": "module",
21
21
  "exports": {
@@ -34,17 +34,17 @@
34
34
  "clean": "git rm -f pnpm-lock.yaml ; git clean -fdX",
35
35
  "fix": "ksc fix",
36
36
  "lint": "ksc lint",
37
- "release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$({{npm-auth-command}}) && pnpm publish",
37
+ "release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$({{{npm-auth-command}}}) && pnpm publish",
38
38
  "test": "echo \"Error: no test specified\" && exit 1"
39
39
  },
40
40
  "dependencies": {
41
- "@types/node": "^20.19.24",
41
+ "@types/node": "~20.19.24",
42
42
  "lognow": "^0.2.2"
43
43
  },
44
44
  "devDependencies": {
45
- "@kitschpatrol/shared-config": "^5.8.1",
45
+ "@kitschpatrol/shared-config": "^5.8.3",
46
46
  "bumpp": "^10.3.1",
47
- "tsdown": "^0.16.0",
47
+ "tsdown": "^0.16.1",
48
48
  "typescript": "~5.9.3"
49
49
  },
50
50
  "packageManager": "pnpm@10.20.0",
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 {{author-name}}
3
+ Copyright (c) {{{year}}} {{{author-name}}}
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,22 +1,22 @@
1
1
  {
2
- "name": "{{github-repository}}",
2
+ "name": "{{{github-repository}}}",
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
- "description": "A {{type}} project.",
5
+ "description": "A {{{type}}} project.",
6
6
  "keywords": [
7
- "{{type}}"
7
+ "{{{type}}}"
8
8
  ],
9
- "homepage": "https://github.com/{{github-owner}}/{{github-repository}}",
10
- "bugs": "https://github.com/{{github-owner}}/{{github-repository}}/issues",
9
+ "homepage": "https://github.com/{{{github-owner}}}/{{{github-repository}}}",
10
+ "bugs": "https://github.com/{{{github-owner}}}/{{{github-repository}}}/issues",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git+https://github.com/{{github-owner}}/{{github-repository}}.git"
13
+ "url": "git+https://github.com/{{{github-owner}}}/{{{github-repository}}}.git"
14
14
  },
15
15
  "license": "MIT",
16
16
  "author": {
17
- "name": "{{author-name}}",
18
- "email": "{{author-email}}",
19
- "url": "{{author-url}}"
17
+ "name": "{{{author-name}}}",
18
+ "email": "{{{author-email}}}",
19
+ "url": "{{{author-url}}}"
20
20
  },
21
21
  "type": "module",
22
22
  "scripts": {
@@ -29,10 +29,10 @@
29
29
  "test": "echo \"Error: no test specified\" && exit 1"
30
30
  },
31
31
  "dependencies": {
32
- "@types/node": "^20.19.24"
32
+ "@types/node": "~20.19.24"
33
33
  },
34
34
  "devDependencies": {
35
- "@kitschpatrol/shared-config": "^5.8.1",
35
+ "@kitschpatrol/shared-config": "^5.8.3",
36
36
  "bumpp": "^10.3.1",
37
37
  "tsx": "^4.20.6",
38
38
  "typescript": "~5.9.3"
@@ -0,0 +1,81 @@
1
+ name: Create GitHub Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v[0-9]*'
7
+
8
+ jobs:
9
+ build:
10
+ name: Create Release
11
+ runs-on: ubuntu-latest
12
+ env:
13
+ ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
14
+ IS_VALID_COMMIT: false
15
+ TAG_NAME: ''
16
+
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Log Token Type
24
+ run: |
25
+ if [ ${{ env.ACCESS_TOKEN }} == ${{ secrets.GITHUB_TOKEN }} ]; then
26
+ echo "🗝️ Authenticated with GitHub Token"
27
+ else
28
+ echo "🔑 Authenticated with Personal Access token"
29
+ fi
30
+
31
+ - name: Validate Tag and Branch
32
+ id: validation
33
+ run: |
34
+ TAG=$(git tag --contains HEAD | grep '^v[0-9]' | head -n 1)
35
+ echo "🏷️ Tag for commit is: $TAG"
36
+ BRANCH=$(git branch -r --contains tags/${GITHUB_REF_NAME} | grep 'origin/main' | xargs)
37
+ if [[ -z "$BRANCH" ]]; then
38
+ echo "🚨 Tag is not on main branch"
39
+ else
40
+ echo "🕊️ Current branch is: $BRANCH"
41
+ fi
42
+ if [[ -z "$TAG" || -z "$BRANCH" ]]; then
43
+ echo "IS_VALID_COMMIT=false" >> "$GITHUB_ENV"
44
+ echo "TAG_NAME=''" >> "$GITHUB_ENV"
45
+ else
46
+ echo "IS_VALID_COMMIT=true" >> "$GITHUB_ENV"
47
+ echo "TAG_NAME=$TAG" >> "$GITHUB_ENV"
48
+ fi
49
+
50
+ - name: Release Notes
51
+ if: env.IS_VALID_COMMIT == 'true'
52
+ id: release-notes
53
+ uses: kitschpatrol/github-action-release-changelog@v2
54
+
55
+ - name: Release
56
+ if: env.IS_VALID_COMMIT == 'true'
57
+ id: release
58
+ uses: kitschpatrol/github-action-release@v2
59
+ with:
60
+ token: ${{ env.ACCESS_TOKEN }}
61
+ draft: false
62
+ prerelease: false
63
+ name: ${{ env.TAG_NAME }}
64
+ tag_name: ${{ env.TAG_NAME }}
65
+ body: |
66
+ ${{ steps.release-notes.outputs.changelog }}
67
+ files: |
68
+ readme.md
69
+ README.md
70
+ LICENSE
71
+ license.txt
72
+ CHANGELOG
73
+ CHANGELOG.md
74
+ changelog.md
75
+
76
+ - name: Log Release Details
77
+ if: env.IS_VALID_COMMIT == 'true'
78
+ run: |
79
+ echo "📦 Successfully released: ${{ env.TAG_NAME }}"
80
+ echo "🔗 Release URL: ${{ steps.release.outputs.url }}"
81
+ echo "🪪 Release ID: ${{ steps.release.outputs.id }}"
@@ -0,0 +1,21 @@
1
+ name: Set GitHub Metadata
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ workflow_dispatch: {}
6
+
7
+ jobs:
8
+ build:
9
+ name: Set GitHub Metadata
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ - name: Sync Package info to GitHub
19
+ uses: kitschpatrol/github-action-repo-sync@v3
20
+ with:
21
+ TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
@@ -0,0 +1,22 @@
1
+ # Git Ignore
2
+ # Also used by CSpell, Stylelint, and ESLint
3
+
4
+ # @kitschpatrol/repo-config boilerplate
5
+ .astro/
6
+ .DS_Store
7
+ .env
8
+ .env.*
9
+ !.env.example
10
+ .eslint-config-inspector
11
+ .svelte-kit/
12
+ {tmp,temp}/
13
+ **/*.min.js
14
+ /scratch/
15
+ bower_components/
16
+ build/
17
+ coverage/
18
+ dist/
19
+ node_modules/
20
+ vendor/
21
+
22
+ # Customizations
@@ -0,0 +1,16 @@
1
+ publish-branch=main
2
+
3
+ # Required for using @kitschpatrol/shared-config and the ksc command with pnpm
4
+ public-hoist-pattern[]=@kitschpatrol/repo-config
5
+ public-hoist-pattern[]=@kitschpatrol/typescript-config
6
+ public-hoist-pattern[]=case-police
7
+ public-hoist-pattern[]=*cspell*
8
+ public-hoist-pattern[]=*eslint*
9
+ public-hoist-pattern[]=*knip*
10
+ public-hoist-pattern[]=*mdat*
11
+ public-hoist-pattern[]=*prettier*
12
+ public-hoist-pattern[]=*remark*
13
+ public-hoist-pattern[]=*stylelint*
14
+
15
+ # Required for automated local publishing
16
+ //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
@@ -0,0 +1,8 @@
1
+ # Prettier Ignore
2
+ # Also respects .gitignore
3
+
4
+ # @kitschpatrol/prettier-config boilerplate
5
+ pnpm-lock.yaml
6
+ package-lock.json
7
+
8
+ # Customizations
@@ -0,0 +1,8 @@
1
+ import { remarkConfig } from '@kitschpatrol/remark-config'
2
+
3
+ export default remarkConfig({
4
+ rules: [
5
+ // Useful if the repository is not yet pushed to a remote.
6
+ ['remarkValidateLinks', { repository: false }],
7
+ ],
8
+ })
@@ -0,0 +1,9 @@
1
+ {
2
+ "recommendations": [
3
+ "dbaeumer.vscode-eslint",
4
+ "esbenp.prettier-vscode",
5
+ "streetsidesoftware.code-spell-checker",
6
+ "stylelint.vscode-stylelint",
7
+ "unifiedjs.vscode-mdx"
8
+ ]
9
+ }