@kitschpatrol/create-project 1.0.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 (114) hide show
  1. package/.github/workflows/github-release.yml +81 -0
  2. package/.github/workflows/set-github-metadata.yml +21 -0
  3. package/.prettierignore +8 -0
  4. package/.remarkrc.js +5 -0
  5. package/.vscode/extensions.json +11 -0
  6. package/.vscode/settings.json +66 -0
  7. package/cspell.config.js +3 -0
  8. package/dist/index.js +3602 -0
  9. package/eslint.config.ts +19 -0
  10. package/knip.config.ts +5 -0
  11. package/license.txt +21 -0
  12. package/mdat.config.ts +3 -0
  13. package/package.json +49 -0
  14. package/pnpm-workspace.yaml +7 -0
  15. package/prettier.config.js +3 -0
  16. package/readme.md +98 -0
  17. package/src/index.ts +9 -0
  18. package/src/template.ts +72 -0
  19. package/stylelint.config.js +3 -0
  20. package/templates/cli/.github/workflows/github-release.yml +81 -0
  21. package/templates/cli/.github/workflows/set-github-metadata.yml +21 -0
  22. package/templates/cli/.prettierignore +8 -0
  23. package/templates/cli/.remarkrc.js +6 -0
  24. package/templates/cli/.vscode/extensions.json +8 -0
  25. package/templates/cli/.vscode/settings.json +68 -0
  26. package/templates/cli/cspell.config.js +3 -0
  27. package/templates/cli/eslint.config.ts +5 -0
  28. package/templates/cli/knip.config.ts +3 -0
  29. package/templates/cli/license.txt +21 -0
  30. package/templates/cli/mdat.config.ts +3 -0
  31. package/templates/cli/package.json +54 -0
  32. package/templates/cli/prettier.config.js +3 -0
  33. package/templates/cli/readme.md +45 -0
  34. package/templates/cli/src/index.ts +30 -0
  35. package/templates/cli/tsconfig.json +7 -0
  36. package/templates/cli+library/.github/workflows/github-release.yml +81 -0
  37. package/templates/cli+library/.github/workflows/set-github-metadata.yml +21 -0
  38. package/templates/cli+library/.prettierignore +8 -0
  39. package/templates/cli+library/.remarkrc.js +6 -0
  40. package/templates/cli+library/.vscode/extensions.json +8 -0
  41. package/templates/cli+library/.vscode/settings.json +68 -0
  42. package/templates/cli+library/cspell.config.js +3 -0
  43. package/templates/cli+library/eslint.config.ts +5 -0
  44. package/templates/cli+library/knip.config.ts +3 -0
  45. package/templates/cli+library/license.txt +21 -0
  46. package/templates/cli+library/mdat.config.ts +3 -0
  47. package/templates/cli+library/package.json +62 -0
  48. package/templates/cli+library/prettier.config.js +3 -0
  49. package/templates/cli+library/readme.md +53 -0
  50. package/templates/cli+library/src/bin/cli.ts +42 -0
  51. package/templates/cli+library/src/lib/index.ts +13 -0
  52. package/templates/cli+library/tsconfig.build.json +8 -0
  53. package/templates/cli+library/tsconfig.json +7 -0
  54. package/templates/cli+library/tsdown.config.ts +17 -0
  55. package/templates/library/.github/workflows/github-release.yml +81 -0
  56. package/templates/library/.github/workflows/set-github-metadata.yml +21 -0
  57. package/templates/library/.prettierignore +8 -0
  58. package/templates/library/.remarkrc.js +6 -0
  59. package/templates/library/.vscode/extensions.json +8 -0
  60. package/templates/library/.vscode/settings.json +68 -0
  61. package/templates/library/cspell.config.js +3 -0
  62. package/templates/library/eslint.config.ts +5 -0
  63. package/templates/library/knip.config.ts +3 -0
  64. package/templates/library/license.txt +21 -0
  65. package/templates/library/mdat.config.ts +3 -0
  66. package/templates/library/package.json +58 -0
  67. package/templates/library/prettier.config.js +3 -0
  68. package/templates/library/readme.md +43 -0
  69. package/templates/library/src/index.ts +13 -0
  70. package/templates/library/tsconfig.build.json +8 -0
  71. package/templates/library/tsconfig.json +7 -0
  72. package/templates/minimal/.github/workflows/github-release.yml +81 -0
  73. package/templates/minimal/.github/workflows/set-github-metadata.yml +21 -0
  74. package/templates/minimal/.prettierignore +8 -0
  75. package/templates/minimal/.remarkrc.js +6 -0
  76. package/templates/minimal/.vscode/extensions.json +9 -0
  77. package/templates/minimal/.vscode/settings.json +68 -0
  78. package/templates/minimal/cspell.config.js +3 -0
  79. package/templates/minimal/eslint.config.ts +5 -0
  80. package/templates/minimal/knip.config.ts +3 -0
  81. package/templates/minimal/license.txt +21 -0
  82. package/templates/minimal/mdat.config.ts +3 -0
  83. package/templates/minimal/package.json +46 -0
  84. package/templates/minimal/prettier.config.js +3 -0
  85. package/templates/minimal/readme.md +27 -0
  86. package/templates/minimal/script.ts +1 -0
  87. package/templates/minimal/stylelint.config.js +3 -0
  88. package/templates/minimal/tsconfig.build.json +8 -0
  89. package/templates/minimal/tsconfig.json +7 -0
  90. package/templates/web/.github/workflows/github-release.yml +81 -0
  91. package/templates/web/.github/workflows/set-github-metadata.yml +21 -0
  92. package/templates/web/.prettierignore +8 -0
  93. package/templates/web/.remarkrc.js +6 -0
  94. package/templates/web/.vscode/extensions.json +9 -0
  95. package/templates/web/.vscode/settings.json +68 -0
  96. package/templates/web/cspell.config.js +3 -0
  97. package/templates/web/eslint.config.ts +5 -0
  98. package/templates/web/index.html +13 -0
  99. package/templates/web/knip.config.ts +3 -0
  100. package/templates/web/license.txt +21 -0
  101. package/templates/web/mdat.config.ts +3 -0
  102. package/templates/web/package.json +52 -0
  103. package/templates/web/prettier.config.js +3 -0
  104. package/templates/web/public/vite.svg +35 -0
  105. package/templates/web/readme.md +27 -0
  106. package/templates/web/src/counter.ts +15 -0
  107. package/templates/web/src/main.ts +24 -0
  108. package/templates/web/src/style.css +102 -0
  109. package/templates/web/src/typescript.svg +14 -0
  110. package/templates/web/stylelint.config.js +3 -0
  111. package/templates/web/tsconfig.build.json +8 -0
  112. package/templates/web/tsconfig.json +7 -0
  113. package/tsconfig.build.json +8 -0
  114. package/tsconfig.json +7 -0
@@ -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,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
package/.remarkrc.js ADDED
@@ -0,0 +1,5 @@
1
+ import { remarkConfig } from '@kitschpatrol/remark-config'
2
+
3
+ export default remarkConfig({
4
+ rules: [['remarkValidateLinks', { repository: false }]],
5
+ })
@@ -0,0 +1,11 @@
1
+ {
2
+ "recommendations": [
3
+ "astro-build.astro-vscode",
4
+ "svelte.svelte-vscode",
5
+ "dbaeumer.vscode-eslint",
6
+ "stylelint.vscode-stylelint",
7
+ "streetsidesoftware.code-spell-checker",
8
+ "unifiedjs.vscode-mdx",
9
+ "esbenp.prettier-vscode"
10
+ ]
11
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "explorer.fileNesting.enabled": true,
3
+ "explorer.fileNesting.expand": false,
4
+ "explorer.fileNesting.patterns": {
5
+ "*.js": "*.ts.map, *.js.map, *.d.ts, *.d.ts.map, *.d.js.map",
6
+ "*.ts": "*.ts.map, *.d.ts, *.d.ts.map",
7
+ ".env": ".env.*",
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
+ "readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
10
+ },
11
+ "typescript.enablePromptUseWorkspaceTsdk": true,
12
+ "typescript.tsdk": "node_modules/typescript/lib",
13
+ "editor.codeActionsOnSave": {
14
+ "source.fixAll": "explicit",
15
+ "source.organizeImports": "never"
16
+ },
17
+ "eslint.enable": true,
18
+ "eslint.runtime": "node",
19
+ "eslint.validate": [
20
+ "astro",
21
+ "html",
22
+ "javascript",
23
+ "javascriptreact",
24
+ "json",
25
+ "json5",
26
+ "jsonc",
27
+ "markdown",
28
+ "mdx",
29
+ "svelte",
30
+ "toml",
31
+ "typescript",
32
+ "typescriptreact",
33
+ "xml",
34
+ "yaml"
35
+ ],
36
+ "eslint.useFlatConfig": true,
37
+ "cSpell.enabled": true,
38
+ "cSpell.workspaceRootPath": ".",
39
+ "[astro]": {
40
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
41
+ },
42
+ "[gitignore]": {
43
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
44
+ },
45
+ "[ruby]": {
46
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
47
+ },
48
+ "[shellscript]": {
49
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
50
+ },
51
+ "[svelte]": {
52
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
53
+ },
54
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
55
+ "editor.formatOnSave": true,
56
+ "prettier.documentSelectors": [
57
+ "**/.eslintignore",
58
+ "**/.node-version",
59
+ "**/.npmrc",
60
+ "**/.prettierignore",
61
+ "**/*.astro",
62
+ "**/*.rb",
63
+ "**/*.svelte"
64
+ ],
65
+ "prettier.enable": true
66
+ }
@@ -0,0 +1,3 @@
1
+ import { cspellConfig } from '@kitschpatrol/cspell-config'
2
+
3
+ export default cspellConfig()