create-soybean 1.2.0 → 1.3.0-beta.1

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 (107) hide show
  1. package/README.md +5 -3
  2. package/dist/index.js +4 -4
  3. package/package.json +3 -3
  4. package/template-pnpm-monorepo/.vscode/extensions.json +0 -3
  5. package/template-pnpm-monorepo/package.json +9 -9
  6. package/template-pnpm-monorepo/packages/demo-pkg/package.json +3 -3
  7. package/template-pnpm-monorepo/tsconfig.base.json +11 -5
  8. package/{template-ts-lib-unbuild → template-tsdown}/.vscode/extensions.json +0 -3
  9. package/template-tsdown/package.json +61 -0
  10. package/{template-solid → template-tsdown}/tsconfig.json +8 -2
  11. package/template-tsdown/tsdown.config.ts +17 -0
  12. package/{template-ts-lib-tsup → template-tsup}/.vscode/extensions.json +0 -3
  13. package/{template-ts-lib-tsup → template-tsup}/package.json +15 -12
  14. package/template-tsup/src/index.ts +3 -0
  15. package/template-unbuild/.github/workflows/release.yml +46 -0
  16. package/template-unbuild/.vscode/extensions.json +19 -0
  17. package/template-unbuild/.vscode/launch.json +15 -0
  18. package/template-unbuild/.vscode/settings.json +9 -0
  19. package/template-unbuild/_editorconfig +11 -0
  20. package/template-unbuild/_gitattributes +21 -0
  21. package/{template-react → template-unbuild}/_gitignore +0 -4
  22. package/template-unbuild/_prettierrc +0 -0
  23. package/template-unbuild/eslint.config.js +3 -0
  24. package/{template-ts-lib-unbuild → template-unbuild}/package.json +15 -12
  25. package/template-vue/er.config.ts +9 -0
  26. package/template-vue/eslint.config.js +21 -18
  27. package/template-vue/package.json +26 -25
  28. package/template-vue/src/layouts/base/index.vue +11 -0
  29. package/template-vue/src/layouts/blank/index.vue +11 -0
  30. package/template-vue/src/router/index.ts +4 -7
  31. package/template-vue/src/typings/components.d.ts +17 -0
  32. package/template-vue/src/views/views/(builtin)/403.vue +7 -0
  33. package/template-vue/src/views/{home.vue → views/(builtin)/404/index.vue} +2 -2
  34. package/template-vue/src/views/views/(builtin)/404.vue +7 -0
  35. package/template-vue/src/views/views/(builtin)/login/index.vue +7 -0
  36. package/template-vue/src/views/views/(builtin)/wip.vue +7 -0
  37. package/template-vue/src/views/views/demo.tsx +7 -0
  38. package/template-vue/src/views/views/home/child.vue +7 -0
  39. package/template-vue/src/views/views/home/child2.vue +7 -0
  40. package/template-vue/src/views/views/home/index.vue +9 -0
  41. package/template-vue/src/views/views/list/[id].vue +11 -0
  42. package/template-vue/src/views/views/list/add.vue +7 -0
  43. package/template-vue/src/views/views/list/components/demo.vue +0 -0
  44. package/template-vue/src/views/views/list/components/search-list.vue +7 -0
  45. package/template-vue/src/views/views/list/detail2-[[id]]-[[userId]].vue +7 -0
  46. package/template-vue/src/views/views/list/detail_[id]_[userId].vue +7 -0
  47. package/template-vue/src/views/views/list/edit_[id].vue +7 -0
  48. package/template-vue/src/views/views/list/index.vue +7 -0
  49. package/template-vue/src/views/views/list/modules/list-table.vue +7 -0
  50. package/template-vue/tsconfig.json +3 -0
  51. package/template-vue/uno.config.ts +9 -6
  52. package/template-vue/vite.config.ts +14 -8
  53. package/template-vue-tsdown/.github/workflows/release.yml +46 -0
  54. package/template-vue-tsdown/.vscode/extensions.json +19 -0
  55. package/template-vue-tsdown/.vscode/launch.json +15 -0
  56. package/template-vue-tsdown/.vscode/settings.json +9 -0
  57. package/template-vue-tsdown/_editorconfig +11 -0
  58. package/template-vue-tsdown/_gitattributes +21 -0
  59. package/{template-react-native → template-vue-tsdown}/_gitignore +0 -4
  60. package/template-vue-tsdown/_prettierrc +0 -0
  61. package/template-vue-tsdown/eslint.config.js +5 -0
  62. package/template-vue-tsdown/package.json +65 -0
  63. package/template-vue-tsdown/playground/index.html +12 -0
  64. package/template-vue-tsdown/playground/src/App.vue +7 -0
  65. package/template-vue-tsdown/playground/src/index.ts +5 -0
  66. package/template-vue-tsdown/playground/src/style.css +53 -0
  67. package/template-vue-tsdown/src/demo-pkg.vue +45 -0
  68. package/template-vue-tsdown/src/index.ts +3 -0
  69. package/{template-ts-lib-tsup → template-vue-tsdown}/tsconfig.json +8 -2
  70. package/template-vue-tsdown/tsdown.config.ts +16 -0
  71. package/template-vue-tsdown/vite.config.ts +7 -0
  72. package/template-vue-tsdown/vitest.config.ts +9 -0
  73. package/template-react/_eslintrc +0 -3
  74. package/template-react/package.json +0 -6
  75. package/template-react-native/_eslintrc +0 -3
  76. package/template-react-native/package.json +0 -6
  77. package/template-solid/_eslintrc +0 -3
  78. package/template-solid/_gitignore +0 -34
  79. package/template-solid/package.json +0 -6
  80. package/template-ts-lib-unbuild/_npmrc +0 -2
  81. package/template-ts-lib-unbuild/tsconfig.json +0 -24
  82. /package/{template-ts-lib-tsup → template-tsdown}/.github/workflows/release.yml +0 -0
  83. /package/{template-ts-lib-tsup → template-tsdown}/.vscode/launch.json +0 -0
  84. /package/{template-ts-lib-tsup → template-tsdown}/.vscode/settings.json +0 -0
  85. /package/{template-ts-lib-tsup → template-tsdown}/_editorconfig +0 -0
  86. /package/{template-ts-lib-tsup → template-tsdown}/_gitattributes +0 -0
  87. /package/{template-ts-lib-tsup → template-tsdown}/_gitignore +0 -0
  88. /package/{template-react-native → template-tsdown}/_npmrc +0 -0
  89. /package/{template-ts-lib-tsup → template-tsdown}/_prettierrc +0 -0
  90. /package/{template-ts-lib-tsup → template-tsdown}/eslint.config.js +0 -0
  91. /package/{template-ts-lib-tsup → template-tsdown}/src/index.ts +0 -0
  92. /package/{template-ts-lib-unbuild → template-tsup}/.github/workflows/release.yml +0 -0
  93. /package/{template-ts-lib-unbuild → template-tsup}/.vscode/launch.json +0 -0
  94. /package/{template-ts-lib-unbuild → template-tsup}/.vscode/settings.json +0 -0
  95. /package/{template-ts-lib-unbuild → template-tsup}/_editorconfig +0 -0
  96. /package/{template-ts-lib-unbuild → template-tsup}/_gitattributes +0 -0
  97. /package/{template-ts-lib-unbuild → template-tsup}/_gitignore +0 -0
  98. /package/{template-react → template-tsup}/_npmrc +0 -0
  99. /package/{template-ts-lib-unbuild → template-tsup}/_prettierrc +0 -0
  100. /package/{template-ts-lib-unbuild → template-tsup}/eslint.config.js +0 -0
  101. /package/{template-react-native → template-tsup}/tsconfig.json +0 -0
  102. /package/{template-ts-lib-tsup → template-tsup}/tsup.config.ts +0 -0
  103. /package/{template-solid → template-unbuild}/_npmrc +0 -0
  104. /package/{template-ts-lib-unbuild → template-unbuild}/build.config.ts +0 -0
  105. /package/{template-ts-lib-unbuild → template-unbuild}/src/index.ts +0 -0
  106. /package/{template-react → template-unbuild}/tsconfig.json +0 -0
  107. /package/{template-ts-lib-tsup → template-vue-tsdown}/_npmrc +0 -0
package/README.md CHANGED
@@ -4,7 +4,9 @@ SoybeanJS's command line to create different project templates
4
4
 
5
5
  ## currently support
6
6
 
7
- - template-ts-lib-tsup: use tsup to build TypeScript library
8
- - template-ts-lib-unbuild: use unbuild to build TypeScript library
9
7
  - template-pnpm-monorepo: create a monorepo project with pnpm
10
- - template-vue: create a vue project quickly with eslint, simple-git-hooks and lint-staged
8
+ - template-tsdown: create a ts library project quickly with tsdown
9
+ - template-tsup: create a ts library project quickly with tsup
10
+ - template-unbuild: create a ts library project quickly with unbuild
11
+ - template-vue: create a vue project quickly
12
+ - template-vue-tsdown: create a vue library project quickly with tsdown
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import x from"node:process";import{existsSync as $,mkdirSync as U,readFileSync as q,readdirSync as G,writeFileSync as H}from"node:fs";import a from"node:path";import{fileURLToPath as K}from"node:url";import{blue as _,cyan as D,green as Q,lightBlue as W,red as X,reset as m,yellow as Y}from"kolorist";import Z from"minimist";import ee from"prompts";import{consola as g}from"consola";import{copyFileSync as L,existsSync as O,mkdirSync as J,readdirSync as v,rmSync as B,statSync as I}from"node:fs";import d from"node:path";function b(e){return e?.trim()?.replace(/\/+$/g,"")}function h(e){let t=v(e);return t.length===0||t.length===1&&t[0]===".git"}function S(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function j(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function N(e){if(!O(e))return;let s=v(e);for(let n of s)if(n!==".git"){let i=d.resolve(e,n);B(i,{recursive:!0,force:!0})}}function M(e,t){J(t,{recursive:!0});let s=v(e);for(let n of s){let i=d.resolve(e,n),l=d.resolve(t,n);T(i,l)}}function T(e,t){I(e).isDirectory()?M(e,t):L(e,t)}var F=[{type:"ts-lib-tsup",name:"TypeScript library by tsup",color:_},{type:"ts-lib-unbuild",name:"TypeScript library by unbuild",color:_},{type:"pnpm-monorepo",name:"Pnpm monorepo",color:Y},{type:"vue",name:"Vue 3",color:Q},{type:"react",name:"React",color:D},{type:"react-native",name:"React Native",color:D},{type:"solid",name:"Solid",color:W}],C=F.map(e=>e.type),te={_editorconfig:".editorconfig",_gitattributes:".gitattributes",_gitignore:".gitignore",_npmrc:".npmrc",_prettierrc:".prettierrc"},w="create-soybean-project";async function re(){let e=x.cwd(),t=Z(x.argv.slice(2),{string:["_"]}),s=b(t._[0]),n=t.template||t.t,i=s||w;function l(){return i==="."?a.basename(a.resolve()):i}let u=null;try{u=await ee([{type:s?null:"text",name:"projectName",message:m("Project name:"),initial:w,onState:r=>{i=b(r.value)||w}},{type:()=>!$(i)||h(i)?null:"confirm",name:"overwrite",message:()=>`${i==="."?"Current directory":`Target directory "${i}"`} is not empty. Remove existing files and continue?`},{type:(r,{overwrite:o})=>{if(o===!1)throw new Error(`${X("\u2716")} Operation cancelled`);return null},name:"overwriteChecker"},{type:()=>S(l())?null:"text",name:"packageName",message:m("Package name:"),initial:()=>j(l()),validate:r=>S(r)||"Invalid package.json name"},{type:n&&C.includes(n)?null:"select",name:"template",message:typeof n=="string"&&!C.includes(n)?m(`"${n}" isn't a valid template. Please choose from below: `):m("Select a template:"),initial:0,choices:F.map(({type:r,name:o,color:p})=>({title:p(o),value:r}))}])}catch(r){g.error(r)}if(!u)return;let{template:E,overwrite:z,packageName:A}=u,c=a.join(e,i);z?N(c):$(c)||U(c,{recursive:!0});let R=E||n;g.info(`
3
- Scaffolding project in ${c}...`);let f=a.resolve(K(import.meta.url),"../..",`template-${R}`),k=(r,o)=>{let p=a.join(c,te[r]??r);o?H(p,o):T(a.join(f,r),p)},V=G(f);for(let r of V.filter(o=>o!=="package.json"))k(r);let P=JSON.parse(q(a.join(f,"package.json"),"utf-8"));P.name=A||l(),k("package.json",`${JSON.stringify(P,null,2)}
4
- `);let y=a.relative(e,c);g.info(`
2
+ import $ from"node:process";import{existsSync as _,mkdirSync as q,readFileSync as B,readdirSync as G,writeFileSync as H}from"node:fs";import a from"node:path";import{fileURLToPath as K}from"node:url";import{cyan as b,green as D,red as Q,reset as m,yellow as W}from"kolorist";import X from"minimist";import Y from"prompts";import{consola as g}from"consola";import{copyFileSync as O,existsSync as R,mkdirSync as J,readdirSync as v,rmSync as I,statSync as M}from"node:fs";import d from"node:path";function w(e){return e?.trim()?.replace(/\/+$/g,"")}function h(e){let t=v(e);return t.length===0||t.length===1&&t[0]===".git"}function S(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function N(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function x(e){if(!R(e))return;let s=v(e);for(let n of s)if(n!==".git"){let o=d.resolve(e,n);I(o,{recursive:!0,force:!0})}}function U(e,t){J(t,{recursive:!0});let s=v(e);for(let n of s){let o=d.resolve(e,n),p=d.resolve(t,n);T(o,p)}}function T(e,t){M(e).isDirectory()?U(e,t):O(e,t)}var F=[{type:"template-pnpm-monorepo",name:"Pnpm monorepo",color:W},{type:"template-tsdown",name:"TypeScript library by tsdown",color:b},{type:"template-tsup",name:"TypeScript library by tsup",color:b},{type:"template-unbuild",name:"TypeScript library by unbuild",color:b},{type:"template-vue",name:"Vue 3",color:D},{type:"template-vue-tsdown",name:"Vue 3 + TypeScript library by tsdown",color:D}],C=F.map(e=>e.type),Z={_editorconfig:".editorconfig",_gitattributes:".gitattributes",_gitignore:".gitignore",_npmrc:".npmrc",_prettierrc:".prettierrc"},k="create-soybean-project";async function ee(){let e=$.cwd(),t=X($.argv.slice(2),{string:["_"]}),s=w(t._[0]),n=t.template||t.t,o=s||k;function p(){return o==="."?a.basename(a.resolve()):o}let u=null;try{u=await Y([{type:s?null:"text",name:"projectName",message:m("Project name:"),initial:k,onState:r=>{o=w(r.value)||k}},{type:()=>!_(o)||h(o)?null:"confirm",name:"overwrite",message:()=>`${o==="."?"Current directory":`Target directory "${o}"`} is not empty. Remove existing files and continue?`},{type:(r,{overwrite:i})=>{if(i===!1)throw new Error(`${Q("\u2716")} Operation cancelled`);return null},name:"overwriteChecker"},{type:()=>S(p())?null:"text",name:"packageName",message:m("Package name:"),initial:()=>N(p()),validate:r=>S(r)||"Invalid package.json name"},{type:n&&C.includes(n)?null:"select",name:"template",message:typeof n=="string"&&!C.includes(n)?m(`"${n}" isn't a valid template. Please choose from below: `):m("Select a template:"),initial:0,choices:F.map(({type:r,name:i,color:c})=>({title:c(i),value:r}))}])}catch(r){g.error(r)}if(!u)return;let{template:E,overwrite:V,packageName:z}=u,l=a.join(e,o);V?x(l):_(l)||q(l,{recursive:!0});let A=E||n;g.info(`
3
+ Scaffolding project in ${l}...`);let f=a.resolve(K(import.meta.url),"../..",`template-${A}`),P=(r,i)=>{let c=a.join(l,Z[r]??r);i?H(c,i):T(a.join(f,r),c)},L=G(f);for(let r of L.filter(i=>i!=="package.json"))P(r);let j=JSON.parse(B(a.join(f,"package.json"),"utf-8"));j.name=z||p(),P("package.json",`${JSON.stringify(j,null,2)}
4
+ `);let y=a.relative(e,l);g.info(`
5
5
  Done. Now run:
6
- `),c!==e&&g.info(` cd ${y.includes(" ")?`"${y}"`:y}`)}re();
6
+ `),l!==e&&g.info(` cd ${y.includes(" ")?`"${y}"`:y}`)}ee();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-soybean",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.3.0-beta.1",
5
5
  "description": "SoybeanJS's command line to create different project templates",
6
6
  "author": {
7
7
  "name": "Soybean",
@@ -28,7 +28,7 @@
28
28
  "template-*"
29
29
  ],
30
30
  "dependencies": {
31
- "consola": "3.4.0",
31
+ "consola": "3.4.2",
32
32
  "kolorist": "1.8.0",
33
33
  "minimist": "1.2.8",
34
34
  "prompts": "2.4.2"
@@ -37,7 +37,7 @@
37
37
  "@types/minimist": "1.2.5",
38
38
  "@types/prompts": "2.4.9",
39
39
  "tsup": "8.4.0",
40
- "typescript": "5.8.2"
40
+ "typescript": "5.8.3"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "pnpm typecheck && pnpm build-only",
@@ -6,9 +6,6 @@
6
6
  "dbaeumer.vscode-eslint",
7
7
  "editorconfig.editorconfig",
8
8
  "esbenp.prettier-vscode",
9
- "formulahendry.auto-close-tag",
10
- "formulahendry.auto-complete-tag",
11
- "formulahendry.auto-rename-tag",
12
9
  "lokalise.i18n-ally",
13
10
  "mhutchie.git-graph",
14
11
  "mikestead.dotenv",
@@ -1,9 +1,9 @@
1
1
  {
2
- "name": "pnpm-monorepo",
2
+ "name": "template-pnpm-monorepo",
3
3
  "type": "module",
4
4
  "version": "0.0.0",
5
5
  "private": true,
6
- "packageManager": "pnpm@10.6.3",
6
+ "packageManager": "pnpm@10.11.0",
7
7
  "scripts": {
8
8
  "cleanup": "soy cleanup",
9
9
  "commit": "soy git-commit",
@@ -15,13 +15,13 @@
15
15
  },
16
16
  "dependencies": {},
17
17
  "devDependencies": {
18
- "@soybeanjs/cli": "1.2.0",
19
- "@soybeanjs/eslint-config": "1.6.0",
20
- "eslint": "9.22.0",
21
- "lint-staged": "15.5.0",
22
- "simple-git-hooks": "2.11.1",
23
- "tsx": "4.19.3",
24
- "typescript": "5.8.2"
18
+ "@soybeanjs/cli": "1.3.0-beta.1",
19
+ "@soybeanjs/eslint-config": "1.6.1",
20
+ "eslint": "9.26.0",
21
+ "lint-staged": "16.0.0",
22
+ "simple-git-hooks": "2.13.0",
23
+ "tsx": "4.19.4",
24
+ "typescript": "5.8.3"
25
25
  },
26
26
  "simple-git-hooks": {
27
27
  "commit-msg": "pnpm soy git-commit-verify",
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "demo-pkg",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.3.0-beta.1",
5
5
  "private": true,
6
- "packageManager": "pnpm@10.6.3",
6
+ "packageManager": "pnpm@10.11.0",
7
7
  "scripts": {
8
8
  "typecheck": "tsc --noEmit --skipLibCheck"
9
9
  },
10
10
  "dependencies": {},
11
11
  "devDependencies": {
12
- "typescript": "5.8.2"
12
+ "typescript": "5.8.3"
13
13
  }
14
14
  }
@@ -6,19 +6,25 @@
6
6
  "lib": ["DOM", "ESNext"],
7
7
  "baseUrl": ".",
8
8
  "module": "ESNext",
9
- "moduleResolution": "node",
9
+ "moduleResolution": "bundler",
10
10
  "paths": {
11
- "@/*": ["src/*"]
11
+ "@/*": ["./src/*"]
12
12
  },
13
13
  "resolveJsonModule": true,
14
+ "types": ["node"],
14
15
  "strict": true,
15
16
  "strictNullChecks": true,
16
- "noImplicitThis": true,
17
- "noUnusedLocals": false,
17
+ "noUnusedLocals": true,
18
+ "declaration": true,
19
+ "emitDeclarationOnly": true,
20
+ "outDir": "./dist",
18
21
  "allowSyntheticDefaultImports": true,
19
22
  "esModuleInterop": true,
20
23
  "forceConsistentCasingInFileNames": true,
21
- "isolatedModules": true
24
+ "isolatedModules": true,
25
+ "verbatimModuleSyntax": true,
26
+ "skipLibCheck": true
22
27
  },
28
+ "include": ["src/**/*"],
23
29
  "exclude": ["node_modules", "dist"]
24
30
  }
@@ -6,9 +6,6 @@
6
6
  "dbaeumer.vscode-eslint",
7
7
  "editorconfig.editorconfig",
8
8
  "esbenp.prettier-vscode",
9
- "formulahendry.auto-close-tag",
10
- "formulahendry.auto-complete-tag",
11
- "formulahendry.auto-rename-tag",
12
9
  "lokalise.i18n-ally",
13
10
  "mhutchie.git-graph",
14
11
  "mikestead.dotenv",
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "template-tsdown",
3
+ "type": "module",
4
+ "version": "0.0.0",
5
+ "private": true,
6
+ "packageManager": "pnpm@10.11.0",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
10
+ "sideEffects": false,
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.cjs"
16
+ }
17
+ },
18
+ "main": "./dist/index.cjs",
19
+ "module": "./dist/index.mjs",
20
+ "types": "./dist/index.d.ts",
21
+ "files": ["dist"],
22
+ "scripts": {
23
+ "build": "tsdown",
24
+ "cleanup": "soy cleanup",
25
+ "commit": "soy git-commit",
26
+ "dev": "tsup --watch",
27
+ "lint": "eslint . --fix",
28
+ "prepare": "simple-git-hooks",
29
+ "publish-pkg": "pnpm publish --access public",
30
+ "release": "soy release",
31
+ "typecheck": "tsc --noEmit --skipLibCheck",
32
+ "update-pkg": "soy ncu"
33
+ },
34
+ "dependencies": {
35
+ "cli-progress": "3.12.0",
36
+ "consola": "3.4.2",
37
+ "dayjs": "1.11.13",
38
+ "execa": "9.5.3",
39
+ "kolorist": "1.8.0",
40
+ "ofetch": "1.4.1"
41
+ },
42
+ "devDependencies": {
43
+ "@soybeanjs/cli": "1.3.0-beta.1",
44
+ "@soybeanjs/eslint-config": "1.6.1",
45
+ "@types/cli-progress": "3.11.6",
46
+ "@types/node": "22.15.18",
47
+ "eslint": "9.26.0",
48
+ "lint-staged": "16.0.0",
49
+ "simple-git-hooks": "2.13.0",
50
+ "tsdown": "0.11.9",
51
+ "tsx": "4.19.4",
52
+ "typescript": "5.8.3"
53
+ },
54
+ "simple-git-hooks": {
55
+ "commit-msg": "pnpm soy git-commit-verify",
56
+ "pre-commit": "pnpm typecheck && pnpm lint-staged"
57
+ },
58
+ "lint-staged": {
59
+ "*": "eslint --fix"
60
+ }
61
+ }
@@ -2,10 +2,11 @@
2
2
  "compilerOptions": {
3
3
  "target": "ESNext",
4
4
  "jsx": "preserve",
5
+ "jsxImportSource": "vue",
5
6
  "lib": ["DOM", "ESNext"],
6
7
  "baseUrl": ".",
7
8
  "module": "ESNext",
8
- "moduleResolution": "node",
9
+ "moduleResolution": "bundler",
9
10
  "paths": {
10
11
  "@/*": ["./src/*"]
11
12
  },
@@ -14,10 +15,15 @@
14
15
  "strict": true,
15
16
  "strictNullChecks": true,
16
17
  "noUnusedLocals": true,
18
+ "declaration": true,
19
+ "emitDeclarationOnly": true,
17
20
  "outDir": "./dist",
18
21
  "allowSyntheticDefaultImports": true,
19
22
  "esModuleInterop": true,
20
- "forceConsistentCasingInFileNames": true
23
+ "forceConsistentCasingInFileNames": true,
24
+ "isolatedModules": true,
25
+ "verbatimModuleSyntax": true,
26
+ "skipLibCheck": true
21
27
  },
22
28
  "include": ["src/**/*"],
23
29
  "exclude": ["node_modules", "dist"]
@@ -0,0 +1,17 @@
1
+ import { defineConfig } from 'tsdown';
2
+
3
+ export default defineConfig({
4
+ entry: ['src/index.ts'],
5
+ platform: 'neutral',
6
+ clean: true,
7
+ dts: true,
8
+ format: ['esm', 'cjs'],
9
+ outExtensions: ctx => {
10
+ return {
11
+ js: ctx.format === 'cjs' ? '.cjs' : '.mjs'
12
+ };
13
+ },
14
+ shims: true,
15
+ sourcemap: false,
16
+ minify: false
17
+ });
@@ -6,9 +6,6 @@
6
6
  "dbaeumer.vscode-eslint",
7
7
  "editorconfig.editorconfig",
8
8
  "esbenp.prettier-vscode",
9
- "formulahendry.auto-close-tag",
10
- "formulahendry.auto-complete-tag",
11
- "formulahendry.auto-rename-tag",
12
9
  "lokalise.i18n-ally",
13
10
  "mhutchie.git-graph",
14
11
  "mikestead.dotenv",
@@ -1,9 +1,12 @@
1
1
  {
2
- "name": "ts-lib-tsup",
2
+ "name": "template-tsup",
3
3
  "type": "module",
4
4
  "version": "0.0.0",
5
5
  "private": true,
6
- "packageManager": "pnpm@10.6.3",
6
+ "packageManager": "pnpm@10.11.0",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
7
10
  "sideEffects": false,
8
11
  "exports": {
9
12
  ".": {
@@ -30,23 +33,23 @@
30
33
  },
31
34
  "dependencies": {
32
35
  "cli-progress": "3.12.0",
33
- "consola": "3.4.0",
36
+ "consola": "3.4.2",
34
37
  "dayjs": "1.11.13",
35
- "execa": "9.5.2",
38
+ "execa": "9.5.3",
36
39
  "kolorist": "1.8.0",
37
40
  "ofetch": "1.4.1"
38
41
  },
39
42
  "devDependencies": {
40
- "@soybeanjs/cli": "1.2.0",
41
- "@soybeanjs/eslint-config": "1.6.0",
43
+ "@soybeanjs/cli": "1.3.0-beta.1",
44
+ "@soybeanjs/eslint-config": "1.6.1",
42
45
  "@types/cli-progress": "3.11.6",
43
- "@types/node": "22.13.10",
44
- "eslint": "9.22.0",
45
- "lint-staged": "15.5.0",
46
- "simple-git-hooks": "2.11.1",
46
+ "@types/node": "22.15.18",
47
+ "eslint": "9.26.0",
48
+ "lint-staged": "16.0.0",
49
+ "simple-git-hooks": "2.13.0",
47
50
  "tsup": "8.4.0",
48
- "tsx": "4.19.3",
49
- "typescript": "5.8.2"
51
+ "tsx": "4.19.4",
52
+ "typescript": "5.8.3"
50
53
  },
51
54
  "simple-git-hooks": {
52
55
  "commit-msg": "pnpm soy git-commit-verify",
@@ -0,0 +1,3 @@
1
+ export function fn() {
2
+ return '';
3
+ }
@@ -0,0 +1,46 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ release:
10
+ permissions:
11
+ id-token: write
12
+ contents: write
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: Install pnpm
20
+ uses: pnpm/action-setup@v2
21
+
22
+ - name: Set node
23
+ uses: actions/setup-node@v3
24
+ with:
25
+ node-version: lts/*
26
+ cache: pnpm
27
+ registry-url: "https://registry.npmjs.org"
28
+
29
+ - run: npx githublogen
30
+ env:
31
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32
+
33
+ - name: Install Dependencies
34
+ run: pnpm install --no-frozen-lockfile
35
+
36
+ - name: PNPM build
37
+ run: pnpm run build
38
+
39
+ - name: Publish to NPM
40
+ run: pnpm -r publish --access public --no-git-checks
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
43
+ NPM_CONFIG_PROVENANCE: true
44
+
45
+ - name: Sync Npmmirror
46
+ run: npx syncmirror
@@ -0,0 +1,19 @@
1
+ {
2
+ "recommendations": [
3
+ "afzalsayed96.icones",
4
+ "antfu.iconify",
5
+ "antfu.unocss",
6
+ "dbaeumer.vscode-eslint",
7
+ "editorconfig.editorconfig",
8
+ "esbenp.prettier-vscode",
9
+ "lokalise.i18n-ally",
10
+ "mhutchie.git-graph",
11
+ "mikestead.dotenv",
12
+ "naumovs.color-highlight",
13
+ "pkief.material-icon-theme",
14
+ "sdras.vue-vscode-snippets",
15
+ "vue.volar",
16
+ "whtouche.vscode-js-console-utils",
17
+ "zhuangtongfa.material-theme"
18
+ ]
19
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "configurations": [
4
+ {
5
+ "name": "TS Debugger tsx",
6
+ "type": "node",
7
+ "request": "launch",
8
+ "program": "${file}",
9
+ "runtimeExecutable": "tsx",
10
+ "console": "integratedTerminal",
11
+ "internalConsoleOptions": "neverOpen",
12
+ "skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"]
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "editor.codeActionsOnSave": {
3
+ "source.fixAll.eslint": "explicit",
4
+ "source.organizeImports": "never"
5
+ },
6
+ "editor.formatOnSave": false,
7
+ "eslint.validate": ["json", "jsonc"],
8
+ "prettier.enable": false
9
+ }
@@ -0,0 +1,11 @@
1
+ # Editor configuration, see http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ indent_style = space
8
+ indent_size = 2
9
+ end_of_line = lf
10
+ trim_trailing_whitespace = true
11
+ insert_final_newline = true
@@ -0,0 +1,21 @@
1
+ "*.js" eol=lf
2
+ "*.ts" eol=lf
3
+ "*.jsx" eol=lf
4
+ "*.tsx" eol=lf
5
+ "*.cjs" eol=lf
6
+ "*.cts" eol=lf
7
+ "*.mjs" eol=lf
8
+ "*.mts" eol=lf
9
+ "*.html" eol=lf
10
+ "*.css" eol=lf
11
+ "*.vue" eol=lf
12
+ "*.json" eol=lf
13
+ "*.less" eol=lf
14
+ "*.scss" eol=lf
15
+ "*.sass" eol=lf
16
+ "*.styl" eol=lf
17
+ "*.svelte" eol=lf
18
+ "*.md" eol=lf
19
+ "*.yml" eol=lf
20
+ "*.astro" eol=lf
21
+ "*.mdx" eol=lf
@@ -28,7 +28,3 @@ coverage
28
28
  *.njsproj
29
29
  *.sln
30
30
  *.sw?
31
-
32
- package-lock.json
33
- yarn.lock
34
- pnpm-lock.yaml
File without changes
@@ -0,0 +1,3 @@
1
+ import { defineConfig } from '@soybeanjs/eslint-config';
2
+
3
+ export default defineConfig();
@@ -1,9 +1,12 @@
1
1
  {
2
- "name": "ts-lib-unbuild",
2
+ "name": "template-unbuild",
3
3
  "type": "module",
4
4
  "version": "0.0.0",
5
5
  "private": true,
6
- "packageManager": "pnpm@10.6.3",
6
+ "packageManager": "pnpm@10.11.0",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
7
10
  "sideEffects": false,
8
11
  "exports": {
9
12
  ".": {
@@ -29,22 +32,22 @@
29
32
  },
30
33
  "dependencies": {
31
34
  "cli-progress": "3.12.0",
32
- "consola": "3.4.0",
35
+ "consola": "3.4.2",
33
36
  "dayjs": "1.11.13",
34
- "execa": "9.5.2",
37
+ "execa": "9.5.3",
35
38
  "kolorist": "1.8.0",
36
39
  "ofetch": "1.4.1"
37
40
  },
38
41
  "devDependencies": {
39
- "@soybeanjs/cli": "1.2.0",
40
- "@soybeanjs/eslint-config": "1.6.0",
42
+ "@soybeanjs/cli": "1.3.0-beta.1",
43
+ "@soybeanjs/eslint-config": "1.6.1",
41
44
  "@types/cli-progress": "3.11.6",
42
- "@types/node": "22.13.10",
43
- "eslint": "9.22.0",
44
- "lint-staged": "15.5.0",
45
- "simple-git-hooks": "2.11.1",
46
- "tsx": "4.19.3",
47
- "typescript": "5.8.2",
45
+ "@types/node": "22.15.18",
46
+ "eslint": "9.26.0",
47
+ "lint-staged": "16.0.0",
48
+ "simple-git-hooks": "2.13.0",
49
+ "tsx": "4.19.4",
50
+ "typescript": "5.8.3",
48
51
  "unbuild": "3.5.0"
49
52
  },
50
53
  "simple-git-hooks": {
@@ -0,0 +1,9 @@
1
+ import { defineConfig } from 'elegant-router';
2
+
3
+ export default defineConfig({
4
+ pageInclude: ['**/*.vue', '**/*.tsx', '**/*.jsx'],
5
+ reuseRoutes: ['/reuse1', '/reuse2/:id', '/reuse3/:id?', '/reuse4/:id?/:name?'],
6
+ getRouteMeta: node => ({
7
+ title: node.name
8
+ })
9
+ });
@@ -1,21 +1,24 @@
1
1
  import { defineConfig } from '@soybeanjs/eslint-config';
2
2
 
3
- export default defineConfig({ vue: true, unocss: true }, {
4
- rules: {
5
- 'vue/multi-word-component-names': [
6
- 'warn',
7
- {
8
- ignores: ['index', 'App']
9
- }
10
- ],
11
- 'vue/component-name-in-template-casing': [
12
- 'warn',
13
- 'PascalCase',
14
- {
15
- registeredComponentsOnly: false,
16
- ignores: ['/^icon-/']
17
- }
18
- ],
19
- 'unocss/order-attributify': 'off'
3
+ export default defineConfig(
4
+ { vue: true, unocss: true },
5
+ {
6
+ rules: {
7
+ 'vue/multi-word-component-names': [
8
+ 'warn',
9
+ {
10
+ ignores: ['index', 'App']
11
+ }
12
+ ],
13
+ 'vue/component-name-in-template-casing': [
14
+ 'warn',
15
+ 'PascalCase',
16
+ {
17
+ registeredComponentsOnly: false,
18
+ ignores: ['/^icon-/']
19
+ }
20
+ ],
21
+ 'unocss/order-attributify': 'off'
22
+ }
20
23
  }
21
- });
24
+ );