create-soybean 1.3.0-beta.3 → 1.3.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.
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/template-pnpm-monorepo/package.json +4 -4
- package/template-pnpm-monorepo/packages/demo-pkg/package.json +2 -2
- package/template-tsdown/package.json +7 -7
- package/template-tsup/package.json +7 -7
- package/template-unbuild/package.json +6 -6
- package/template-vue/package.json +15 -15
- package/template-vue-tsdown/package.json +10 -10
- package/template-vue/src/views/(builtin)/404/index.vue +0 -5
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import $ from"
|
|
2
|
+
import $ from"process";import{existsSync as _,mkdirSync as q,readFileSync as B,readdirSync as G,writeFileSync as H}from"fs";import a from"path";import{fileURLToPath as K}from"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"fs";import d from"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),l=d.resolve(t,n);T(o,l)}}function T(e,t){M(e).isDirectory()?U(e,t):O(e,t)}var F=[{type:"pnpm-monorepo",name:"Pnpm monorepo",color:W},{type:"tsdown",name:"TypeScript library by tsdown",color:b},{type:"tsup",name:"TypeScript library by tsup",color:b},{type:"unbuild",name:"TypeScript library by unbuild",color:b},{type:"vue",name:"Vue 3",color:D},{type:"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 l(){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(l())?null:"text",name:"packageName",message:m("Package name:"),initial:()=>N(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:i,color:p})=>({title:p(i),value:r}))}])}catch(r){g.error(r)}if(!u)return;let{template:E,overwrite:V,packageName:z}=u,c=a.join(e,o);V?x(c):_(c)||q(c,{recursive:!0});let A=E||n;g.info(`
|
|
3
3
|
Scaffolding project in ${c}...`);let f=a.resolve(K(import.meta.url),"../..",`template-${A}`),P=(r,i)=>{let p=a.join(c,Z[r]??r);i?H(p,i):T(a.join(f,r),p)},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||l(),P("package.json",`${JSON.stringify(j,null,2)}
|
|
4
4
|
`);let y=a.relative(e,c);g.info(`
|
|
5
5
|
Done. Now run:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-soybean",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"description": "SoybeanJS's command line to create different project templates",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Soybean",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/minimist": "1.2.5",
|
|
38
38
|
"@types/prompts": "2.4.9",
|
|
39
|
-
"tsup": "8.
|
|
39
|
+
"tsup": "8.5.0",
|
|
40
40
|
"typescript": "5.8.3"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@10.
|
|
6
|
+
"packageManager": "pnpm@10.12.1",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"cleanup": "soy cleanup",
|
|
9
9
|
"commit": "soy git-commit",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@soybeanjs/cli": "1.3.
|
|
18
|
+
"@soybeanjs/cli": "1.3.1",
|
|
19
19
|
"@soybeanjs/eslint-config": "1.6.1",
|
|
20
|
-
"eslint": "9.
|
|
21
|
-
"lint-staged": "16.
|
|
20
|
+
"eslint": "9.28.0",
|
|
21
|
+
"lint-staged": "16.1.0",
|
|
22
22
|
"simple-git-hooks": "2.13.0",
|
|
23
23
|
"tsx": "4.19.4",
|
|
24
24
|
"typescript": "5.8.3"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@10.
|
|
6
|
+
"packageManager": "pnpm@10.12.1",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"cli-progress": "3.12.0",
|
|
36
36
|
"consola": "3.4.2",
|
|
37
37
|
"dayjs": "1.11.13",
|
|
38
|
-
"execa": "9.
|
|
38
|
+
"execa": "9.6.0",
|
|
39
39
|
"kolorist": "1.8.0",
|
|
40
40
|
"ofetch": "1.4.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@soybeanjs/cli": "1.3.
|
|
43
|
+
"@soybeanjs/cli": "1.3.1",
|
|
44
44
|
"@soybeanjs/eslint-config": "1.6.1",
|
|
45
45
|
"@types/cli-progress": "3.11.6",
|
|
46
|
-
"@types/node": "22.15.
|
|
47
|
-
"eslint": "9.
|
|
48
|
-
"lint-staged": "16.
|
|
46
|
+
"@types/node": "22.15.30",
|
|
47
|
+
"eslint": "9.28.0",
|
|
48
|
+
"lint-staged": "16.1.0",
|
|
49
49
|
"simple-git-hooks": "2.13.0",
|
|
50
|
-
"tsdown": "0.
|
|
50
|
+
"tsdown": "0.12.7",
|
|
51
51
|
"tsx": "4.19.4",
|
|
52
52
|
"typescript": "5.8.3"
|
|
53
53
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@10.
|
|
6
|
+
"packageManager": "pnpm@10.12.1",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"cli-progress": "3.12.0",
|
|
36
36
|
"consola": "3.4.2",
|
|
37
37
|
"dayjs": "1.11.13",
|
|
38
|
-
"execa": "9.
|
|
38
|
+
"execa": "9.6.0",
|
|
39
39
|
"kolorist": "1.8.0",
|
|
40
40
|
"ofetch": "1.4.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@soybeanjs/cli": "1.3.
|
|
43
|
+
"@soybeanjs/cli": "1.3.1",
|
|
44
44
|
"@soybeanjs/eslint-config": "1.6.1",
|
|
45
45
|
"@types/cli-progress": "3.11.6",
|
|
46
|
-
"@types/node": "22.15.
|
|
47
|
-
"eslint": "9.
|
|
48
|
-
"lint-staged": "16.
|
|
46
|
+
"@types/node": "22.15.30",
|
|
47
|
+
"eslint": "9.28.0",
|
|
48
|
+
"lint-staged": "16.1.0",
|
|
49
49
|
"simple-git-hooks": "2.13.0",
|
|
50
|
-
"tsup": "8.
|
|
50
|
+
"tsup": "8.5.0",
|
|
51
51
|
"tsx": "4.19.4",
|
|
52
52
|
"typescript": "5.8.3"
|
|
53
53
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@10.
|
|
6
|
+
"packageManager": "pnpm@10.12.1",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"cli-progress": "3.12.0",
|
|
35
35
|
"consola": "3.4.2",
|
|
36
36
|
"dayjs": "1.11.13",
|
|
37
|
-
"execa": "9.
|
|
37
|
+
"execa": "9.6.0",
|
|
38
38
|
"kolorist": "1.8.0",
|
|
39
39
|
"ofetch": "1.4.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@soybeanjs/cli": "1.3.
|
|
42
|
+
"@soybeanjs/cli": "1.3.1",
|
|
43
43
|
"@soybeanjs/eslint-config": "1.6.1",
|
|
44
44
|
"@types/cli-progress": "3.11.6",
|
|
45
|
-
"@types/node": "22.15.
|
|
46
|
-
"eslint": "9.
|
|
47
|
-
"lint-staged": "16.
|
|
45
|
+
"@types/node": "22.15.30",
|
|
46
|
+
"eslint": "9.28.0",
|
|
47
|
+
"lint-staged": "16.1.0",
|
|
48
48
|
"simple-git-hooks": "2.13.0",
|
|
49
49
|
"tsx": "4.19.4",
|
|
50
50
|
"typescript": "5.8.3",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@10.
|
|
6
|
+
"packageManager": "pnpm@10.12.1",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "pnpm typecheck && pnpm build-only",
|
|
9
9
|
"build-only": "vite build",
|
|
@@ -17,29 +17,29 @@
|
|
|
17
17
|
"update-pkg": "soy ncu"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@unocss/reset": "66.1.
|
|
20
|
+
"@unocss/reset": "66.1.4",
|
|
21
21
|
"klona": "2.0.6",
|
|
22
|
-
"pinia": "3.0.
|
|
23
|
-
"soy-ui": "0.0.2-beta.
|
|
24
|
-
"vue": "3.5.
|
|
22
|
+
"pinia": "3.0.3",
|
|
23
|
+
"soy-ui": "0.0.2-beta.5",
|
|
24
|
+
"vue": "3.5.16",
|
|
25
25
|
"vue-router": "4.5.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@soybean-ui/unocss-preset": "0.0.2-beta.
|
|
29
|
-
"@soybeanjs/cli": "1.3.
|
|
28
|
+
"@soybean-ui/unocss-preset": "0.0.2-beta.5",
|
|
29
|
+
"@soybeanjs/cli": "1.3.1",
|
|
30
30
|
"@soybeanjs/eslint-config": "1.6.1",
|
|
31
|
-
"@types/node": "22.15.
|
|
32
|
-
"@unocss/eslint-config": "66.1.
|
|
31
|
+
"@types/node": "22.15.30",
|
|
32
|
+
"@unocss/eslint-config": "66.1.4",
|
|
33
33
|
"@vitejs/plugin-vue": "5.2.4",
|
|
34
|
-
"@vitejs/plugin-vue-jsx": "4.
|
|
34
|
+
"@vitejs/plugin-vue-jsx": "4.2.0",
|
|
35
35
|
"elegant-router": "1.0.2",
|
|
36
|
-
"eslint": "9.
|
|
37
|
-
"eslint-plugin-vue": "10.
|
|
38
|
-
"lint-staged": "16.
|
|
36
|
+
"eslint": "9.28.0",
|
|
37
|
+
"eslint-plugin-vue": "10.2.0",
|
|
38
|
+
"lint-staged": "16.1.0",
|
|
39
39
|
"simple-git-hooks": "2.13.0",
|
|
40
40
|
"typescript": "5.8.3",
|
|
41
|
-
"unocss": "66.1.
|
|
42
|
-
"unplugin-vue-components": "28.
|
|
41
|
+
"unocss": "66.1.4",
|
|
42
|
+
"unplugin-vue-components": "28.7.0",
|
|
43
43
|
"vite": "6.3.5",
|
|
44
44
|
"vite-plugin-vue-devtools": "7.7.6",
|
|
45
45
|
"vue-eslint-parser": "10.1.3",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@10.
|
|
6
|
+
"packageManager": "pnpm@10.12.1",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
@@ -35,23 +35,23 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@soybeanjs/cli": "1.3.
|
|
38
|
+
"@soybeanjs/cli": "1.3.1",
|
|
39
39
|
"@soybeanjs/eslint-config": "1.6.1",
|
|
40
|
-
"@types/node": "22.15.
|
|
40
|
+
"@types/node": "22.15.30",
|
|
41
41
|
"@vue/test-utils": "2.4.6",
|
|
42
|
-
"eslint": "9.
|
|
43
|
-
"eslint-plugin-vue": "10.
|
|
44
|
-
"happy-dom": "17.
|
|
45
|
-
"lint-staged": "16.
|
|
42
|
+
"eslint": "9.28.0",
|
|
43
|
+
"eslint-plugin-vue": "10.2.0",
|
|
44
|
+
"happy-dom": "17.6.3",
|
|
45
|
+
"lint-staged": "16.1.0",
|
|
46
46
|
"simple-git-hooks": "2.13.0",
|
|
47
|
-
"tsdown": "0.
|
|
47
|
+
"tsdown": "0.12.7",
|
|
48
48
|
"tsx": "4.19.4",
|
|
49
49
|
"typescript": "5.8.3",
|
|
50
50
|
"unplugin-vue": "6.2.0",
|
|
51
51
|
"unplugin-vue-jsx": "0.6.1",
|
|
52
52
|
"vite": "6.3.5",
|
|
53
|
-
"vitest": "3.
|
|
54
|
-
"vue": "3.5.
|
|
53
|
+
"vitest": "3.2.3",
|
|
54
|
+
"vue": "3.5.16",
|
|
55
55
|
"vue-eslint-parser": "10.1.3",
|
|
56
56
|
"vue-tsc": "2.2.10"
|
|
57
57
|
},
|