@kitschpatrol/create-project 1.0.3 → 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 +18 -15
- package/package.json +9 -4
- package/readme.md +6 -0
- package/templates/cli/.npmrc +3 -0
- package/templates/cli/.remarkrc.js +4 -2
- 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 +27 -5
- package/templates/cli+library/.npmrc +3 -0
- package/templates/cli+library/.remarkrc.js +5 -2
- 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 +19 -7
- 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/electron/.gitignore +24 -0
- package/templates/electron/.npmrc +16 -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/.remarkrc.js +4 -2
- package/templates/library/.vscode/settings.json +2 -2
- package/templates/library/package.json +10 -11
- 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/.remarkrc.js +4 -2
- package/templates/minimal/.vscode/settings.json +2 -2
- package/templates/minimal/package.json +3 -5
- package/templates/minimal/tsconfig.build.json +0 -3
- package/templates/web/.npmrc +3 -0
- package/templates/web/.remarkrc.js +4 -2
- package/templates/web/.vscode/settings.json +2 -2
- package/templates/web/eslint.config.ts +16 -0
- package/templates/web/package.json +10 -10
- package/templates/web/tsconfig.json +3 -1
- package/templates/web/vite.config.ts +11 -0
- package/templates/web/tsconfig.build.json +0 -8
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { log } from './log'
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Do something.
|
|
3
5
|
*/
|
|
4
6
|
export function doSomething(): string {
|
|
7
|
+
log.info('Doing something...')
|
|
5
8
|
return 'Something happened'
|
|
6
9
|
}
|
|
7
10
|
|
|
@@ -9,5 +12,8 @@ export function doSomething(): string {
|
|
|
9
12
|
* Do something else.
|
|
10
13
|
*/
|
|
11
14
|
export function doSomethingElse(): string {
|
|
15
|
+
log.info('Doing something else...')
|
|
12
16
|
return 'Something else happened'
|
|
13
17
|
}
|
|
18
|
+
|
|
19
|
+
export { setLogger } from './log'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ILogBasic, ILogLayer } from 'lognow'
|
|
2
|
+
import { createLogger, injectionHelper } from 'lognow'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The default logger instance for the library.
|
|
6
|
+
*/
|
|
7
|
+
export let log = createLogger()
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Set the logger instance for the module.
|
|
11
|
+
* Export this for library consumers to inject their own logger.
|
|
12
|
+
* @param logger - Accepts either a LogLayer instance or a Console- or Stream-like log target
|
|
13
|
+
*/
|
|
14
|
+
export function setLogger(logger?: ILogBasic | ILogLayer) {
|
|
15
|
+
log = injectionHelper(logger)
|
|
16
|
+
}
|
package/templates/minimal/.npmrc
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { remarkConfig } from '@kitschpatrol/remark-config'
|
|
2
2
|
|
|
3
3
|
export default remarkConfig({
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
rules: [
|
|
5
|
+
// Useful if the repository is not yet pushed to a remote.
|
|
6
|
+
['remarkValidateLinks', { repository: false }],
|
|
7
|
+
],
|
|
6
8
|
})
|
|
@@ -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*"
|
|
@@ -29,17 +29,15 @@
|
|
|
29
29
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@types/node": "^20.19.
|
|
33
|
-
"@types/yargs": "^17.0.33",
|
|
34
|
-
"yargs": "^17.7.2"
|
|
32
|
+
"@types/node": "^20.19.24"
|
|
35
33
|
},
|
|
36
34
|
"devDependencies": {
|
|
37
|
-
"@kitschpatrol/shared-config": "^5.
|
|
35
|
+
"@kitschpatrol/shared-config": "^5.8.0",
|
|
38
36
|
"bumpp": "^10.3.1",
|
|
39
37
|
"tsx": "^4.20.6",
|
|
40
38
|
"typescript": "~5.9.3"
|
|
41
39
|
},
|
|
42
|
-
"packageManager": "pnpm@10.
|
|
40
|
+
"packageManager": "pnpm@10.20.0",
|
|
43
41
|
"engines": {
|
|
44
42
|
"node": ">=20.19.0"
|
|
45
43
|
}
|
package/templates/web/.npmrc
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { remarkConfig } from '@kitschpatrol/remark-config'
|
|
2
2
|
|
|
3
3
|
export default remarkConfig({
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
rules: [
|
|
5
|
+
// Useful if the repository is not yet pushed to a remote.
|
|
6
|
+
['remarkValidateLinks', { repository: false }],
|
|
7
|
+
],
|
|
6
8
|
})
|
|
@@ -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*"
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { eslintConfig } from '@kitschpatrol/eslint-config'
|
|
2
2
|
|
|
3
3
|
export default eslintConfig({
|
|
4
|
+
ts: {
|
|
5
|
+
overrides: {
|
|
6
|
+
'import/no-unresolved': [
|
|
7
|
+
'error',
|
|
8
|
+
{
|
|
9
|
+
ignore: [
|
|
10
|
+
'^astro:',
|
|
11
|
+
'^@astrojs',
|
|
12
|
+
'^virtual:',
|
|
13
|
+
// Public Vite assets...
|
|
14
|
+
'^/',
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
4
20
|
type: 'lib',
|
|
5
21
|
})
|
|
@@ -20,33 +20,33 @@
|
|
|
20
20
|
},
|
|
21
21
|
"type": "module",
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "
|
|
23
|
+
"build": "vite build",
|
|
24
24
|
"clean": "git rm -f pnpm-lock.yaml ; git clean -fdX",
|
|
25
|
-
"dev": "vite",
|
|
25
|
+
"dev": "poptab ; vite",
|
|
26
26
|
"fix": "ksc fix",
|
|
27
27
|
"lint": "ksc lint",
|
|
28
|
-
"preview": "vite preview",
|
|
28
|
+
"preview": "poptab ; vite preview",
|
|
29
29
|
"release": "bumpp --commit 'Release: %s'",
|
|
30
30
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@types/node": "^20.19.
|
|
34
|
-
"@types/yargs": "^17.0.33",
|
|
35
|
-
"yargs": "^17.7.2"
|
|
33
|
+
"@types/node": "^20.19.24"
|
|
36
34
|
},
|
|
37
35
|
"devDependencies": {
|
|
38
|
-
"@kitschpatrol/shared-config": "^5.
|
|
36
|
+
"@kitschpatrol/shared-config": "^5.8.0",
|
|
39
37
|
"bumpp": "^10.3.1",
|
|
38
|
+
"poptab": "^1.0.1",
|
|
40
39
|
"typescript": "~5.9.3",
|
|
41
|
-
"vite": "npm:rolldown-vite@7.1.
|
|
40
|
+
"vite": "npm:rolldown-vite@7.1.17",
|
|
41
|
+
"vite-plugin-mkcert": "^1.17.9"
|
|
42
42
|
},
|
|
43
|
-
"packageManager": "pnpm@10.
|
|
43
|
+
"packageManager": "pnpm@10.20.0",
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=20.19.0"
|
|
46
46
|
},
|
|
47
47
|
"pnpm": {
|
|
48
48
|
"overrides": {
|
|
49
|
-
"vite": "npm:rolldown-vite@7.1.
|
|
49
|
+
"vite": "npm:rolldown-vite@7.1.17"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|