@tomjs/create-app 0.10.3 → 0.11.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.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import a,{renameSync as Ne}from"fs";import Te from"os";import r from"path";import{fileURLToPath as _e}from"url";import{lightBlue as D,lightCyan as Ue,lightGreen as G,lightYellow as ye,red as he,reset as w,yellow as Ie}from"kolorist";import{camelCase as Ve}from"lodash-es";import Je from"minimist";import Me from"prompts";import E from"shelljs";import ge from"os";import ue from"path";import{blue as Ce,red as O,reset as C}from"kolorist";import Fe from"minimist";import B from"prompts";import p from"fs";import M from"path";function A(e){return[["t","template"],["g","git"]].forEach(([i,l])=>{e[l]=e[l]??e[i]}),e}function re(e){return p.readdirSync(e).length===0}function W(e){return e?.trim().replace(/\/+$/g,"")}function Oe(e,i){p.mkdirSync(i,{recursive:!0});for(let l of p.readdirSync(e)){let v=M.resolve(e,l),u=M.resolve(i,l);z(v,u)}}function z(e,i){p.statSync(e).isDirectory()?Oe(e,i):p.copyFileSync(e,i)}function se(e){if(p.existsSync(e))for(let i of p.readdirSync(e))p.rmSync(M.resolve(e,i),{recursive:!0,force:!0})}function L(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function ce(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function ae(e){if(!e)return;let l=e.split(" ")[0].split("/");return{name:l[0],version:l[1]}}function x(e){if(p.existsSync(e))try{return JSON.parse(p.readFileSync(e,"utf8"))}catch(i){console.error(i)}}function h(e,i){p.writeFileSync(e,JSON.stringify(i,null,2)+`
3
- `)}function $(e){p.existsSync(e)&&p.rmSync(e,{recursive:!0,force:!0})}function le(e){p.existsSync(e)||p.mkdirSync(e,{recursive:!0})}var De=A(Fe(process.argv.slice(2),{string:["_"]})),pe={repo:"https://github.com",owner:ge.userInfo().username};function H(e){let{repo:i,owner:l}=e;return`${i}${i.endsWith("/")?"":"/"}${l}`}async function me(e){let i=await B([{type:"text",name:"repo",message:C("Git repository url:"),initial:e?.repo||pe.repo},{type:"text",name:"owner",message:C("Git repository owner:"),initial:e?.owner||pe.owner}],{onCancel:()=>{throw console.log(O("\u2716")+" Operation cancelled"),new Error}});return{id:e?.id||Date.now().toString(),repo:i.repo,owner:i.owner}}var fe=ue.join(ge.homedir(),".tomjs","create-app"),de=ue.join(fe,"config.json");function F(){return le(fe),Object.assign({gitRepos:[]},x(de))}function Ge(e){let i=F();i.createTime?i.updateTime=Date.now():i.createTime=Date.now(),h(de,Object.assign(i,e))}function Y(e){Ge({gitRepos:e})}async function K(){let{gitRepos:e}=F();(e.length===0||De.git)&&(e.length===0&&console.log(`You need to set the ${Ce("git remote repository")} for the first time.`),await i());async function i(){let l=e.map(f=>({title:H(f),value:f.id})).concat([{title:"Add",value:"add"},{title:O("Exit"),value:"exit"}]),v=await B({type:"select",name:"repoId",message:e.length===0?"You choose to add or exit:":"You can choose the repository to be operated, or choose to add or exit:",choices:l},{onCancel:()=>{throw console.log(O("\u2716")+" Operation cancelled"),new Error}}),{repoId:u}=v;if(u==="exit")return;if(u==="add"){let f=await me();return e.push(f),Y(e),i()}let S=e.findIndex(f=>f.id===u),P=await B([{type:"select",name:"action",message:C("Select an action?"),choices:[{title:"Edit",value:"edit"},{title:"Remove",value:"remove"},{title:"Exit",value:"exit"}]},{type:f=>f==="remove"&&"toggle",name:"confirmRemove",message:C("Where confirm to remove?"),initial:!0,active:"Yes",inactive:"No"}],{onCancel:()=>{throw console.log(O("\u2716")+" Operation cancelled"),new Error}}),{action:R,confirmRemove:N}=P;if(R==="exit")return K();if(R==="remove")return N&&(e.splice(S,1),Y(e)),i();let T=await me(e[S]);return e[S]=T,Y(e),i()}}var q=A(Je(process.argv.slice(2),{string:["_"]})),Q=process.cwd(),We=["test","vite","electron","examples"],Se=[{name:"web",display:"Web App",color:G,variants:[{name:"vue",display:"Vue",color:G},{name:"react",display:"React",color:D}]},{name:"electron",display:"Electron App",color:D,variants:[{name:"electron-vue",display:"Vue",color:G},{name:"electron-react",display:"React",color:D}]},{name:"vscode",display:"VSCode Extension",color:Ue,options:[{id:"publish",name:"Git Repository + NPM Publish"},{id:"ssh",name:"Git init by SSH"}],variants:[{name:"vscode",display:"Base",color:ye},{name:"vscode-vue",display:"Vue",color:G},{name:"vscode-react",display:"React",color:D}]},{name:"node",display:"Node",color:ye,options:[{id:"test",name:"Test"},{id:"publish",name:"Git Repository + NPM Publish"},{id:"ssh",name:"Git init by SSH"},{id:"vite",name:"Vite Plugin"},{id:"electron",name:"Electron"},{id:"examples",name:"Examples"}]}],ve=Se.map(e=>e.variants&&e.variants.map(i=>i.name)||[e.name]).reduce((e,i)=>e.concat(i),[]),X="my-app";function xe(e){let i=E.exec(`git config --get ${e}`,{silent:!0});if(i.code===0)return i.stdout.trim()}function we(e){return e.length>1?e.substring(e.indexOf("/")+1):e}async function ze(){let e=W(q._[0]),i=q.template||q.t,l=e||X,v=()=>l==="."?r.basename(r.resolve()):l,u=we(l),{gitRepos:S}=F(),P=await Me([{type:e?null:"text",name:"projectName",message:w("Project name:"),initial:X,onState:t=>{l=W(t.value)||X,u=we(l)}},{type:()=>!a.existsSync(u)||re(u)?null:"toggle",name:"overwrite",message:()=>(u==="."?"Current directory":`Target directory "${u}"`)+" is not empty. Remove existing files and continue?",initial:!1,active:"Yes",inactive:"No"},{type:(t,{overwrite:o})=>{if(o===!1)throw console.log(he("\u2716")+" Operation cancelled"),new Error;return null},name:"overwriteChecker"},{type:()=>L(v())?null:"text",name:"packageName",message:w("Package name:"),initial:()=>ce(v()),validate:t=>L(t)||"Invalid package.json name"},{type:i&&ve.includes(i)?null:"select",name:"framework",message:typeof i=="string"&&!ve.includes(i)?w(`"${i}" isn't a valid template. Please choose from below: `):w("Select a framework:"),initial:0,choices:Se.map(t=>{let o=t.color;return{title:o(t.display||t.name),value:t}})},{type:t=>t&&t.variants?"select":null,name:"variant",message:w("Select a variant:"),choices:t=>t?.variants?.map(o=>{let n=o.color;return{title:n(o.display||o.name),value:o.name}})},{type:(t,o)=>{let{framework:n}=o;return n&&Array.isArray(n.options)&&n.options.length?"multiselect":null},name:"options",message:w("Select optional options:"),instructions:!1,choices:(t,o)=>{let{framework:n}=o;return n?.options?.map(s=>({title:s.name,value:s.id}))}},{type:(t,o)=>S.length&&Array.isArray(o.options)&&o.options.includes("publish")?"select":null,name:"gitUserUrl",message:w("Which git repository to publish to?"),choices:S.map(t=>{let o=H(t);return{title:o,value:o}})}],{onCancel:()=>{throw console.log(he("\u2716")+" Operation cancelled"),new Error}}),{framework:R,overwrite:N,packageName:T,variant:f,gitUserUrl:je}=P,m=P.options||[],c=r.join(Q,u);N?se(c):a.existsSync(c)||a.mkdirSync(c,{recursive:!0}),console.log(`
4
- Scaffolding project in ${c}...`);let _=f||R?.name||i||"",U=t=>r.join(_e(import.meta.url),"../..",`template-${t}`),ke=U(_),I=_.includes("node");[ke,U("config")].forEach(t=>{let o=a.readdirSync(t);for(let n of o){let s=n.startsWith("_")?n.replace("_","."):n;if((I&&!m.includes("examples")||_==="vscode")&&n.includes("stylelint"))continue;let g=r.join(c,s);z(r.join(t,n),g)}});let d=T||v(),j={name:"UserName",email:"name@github.com"};function Z(t=!1){let o=d.startsWith("@")?d.split("/")[0].substring(1):Ve(j.name),n=je||`https://github.com/${o}`;return t&&(n=n.replace(/http(s):\/\//g,"git@").replace(/\//,":")),`${n}/${d.substring(d.indexOf("/")+1)}.git`}Ee(),I&&(be(),Ae(),$e());let ee=ae(process.env.npm_config_user_agent),V=ee?ee.name:"npm";E.which("git")&&(E.exec(`cd ${c} && git init`),m.includes("publish")&&E.exec(`cd ${c} && git remote add origin ${Z(m.includes("ssh"))}`));let J=r.relative(Q,c);switch(console.log(`
2
+ import s,{renameSync as Ie}from"fs";import Ve from"os";import c from"path";import{fileURLToPath as Je}from"url";import{lightBlue as C,lightCyan as We,lightGreen as D,lightYellow as xe,red as Se,reset as w,yellow as Me}from"kolorist";import{camelCase as we}from"lodash-es";import ze from"minimist";import Le from"prompts";import G from"shelljs";import de from"os";import ye from"path";import{blue as Te,red as $,reset as F}from"kolorist";import Ne from"minimist";import H from"prompts";import p from"fs";import M from"path";function R(e){return[["t","template"],["g","git"]].forEach(([r,l])=>{e[l]=e[l]??e[r]}),e}function ce(e){return p.readdirSync(e).length===0}function z(e){return e?.trim().replace(/\/+$/g,"")}function Ge(e,r){p.mkdirSync(r,{recursive:!0});for(let l of p.readdirSync(e)){let x=M.resolve(e,l),f=M.resolve(r,l);L(x,f)}}function L(e,r){p.statSync(e).isDirectory()?Ge(e,r):p.copyFileSync(e,r)}function ae(e){if(p.existsSync(e))for(let r of p.readdirSync(e))p.rmSync(M.resolve(e,r),{recursive:!0,force:!0})}function Y(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function le(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function pe(e){if(!e)return;let l=e.split(" ")[0].split("/");return{name:l[0],version:l[1]}}function S(e){if(p.existsSync(e))try{return JSON.parse(p.readFileSync(e,"utf8"))}catch(r){console.error(r)}}function v(e,r){p.writeFileSync(e,JSON.stringify(r,null,2)+`
3
+ `)}function me(e){return p.existsSync(e)?p.readFileSync(e,"utf8"):""}function A(e){p.existsSync(e)&&p.rmSync(e,{recursive:!0,force:!0})}function ue(e){p.existsSync(e)||p.mkdirSync(e,{recursive:!0})}var _e=R(Ne(process.argv.slice(2),{string:["_"]})),ge={repo:"https://github.com",owner:de.userInfo().username};function K(e){let{repo:r,owner:l}=e;return`${r}${r.endsWith("/")?"":"/"}${l}`}async function fe(e){let r=await H([{type:"text",name:"repo",message:F("Git repository url:"),initial:e?.repo||ge.repo},{type:"text",name:"owner",message:F("Git repository owner:"),initial:e?.owner||ge.owner}],{onCancel:()=>{throw console.log($("\u2716")+" Operation cancelled"),new Error}});return{id:e?.id||Date.now().toString(),repo:r.repo,owner:r.owner}}var he=ye.join(de.homedir(),".tomjs","create-app"),ve=ye.join(he,"config.json");function O(){return ue(he),Object.assign({gitRepos:[]},S(ve))}function Ue(e){let r=O();r.createTime?r.updateTime=Date.now():r.createTime=Date.now(),v(ve,Object.assign(r,e))}function B(e){Ue({gitRepos:e})}async function q(){let{gitRepos:e}=O();(e.length===0||_e.git)&&(e.length===0&&console.log(`You need to set the ${Te("git remote repository")} for the first time.`),await r());async function r(){let l=e.map(y=>({title:K(y),value:y.id})).concat([{title:"Add",value:"add"},{title:$("Exit"),value:"exit"}]),x=await H({type:"select",name:"repoId",message:e.length===0?"You choose to add or exit:":"You can choose the repository to be operated, or choose to add or exit:",choices:l},{onCancel:()=>{throw console.log($("\u2716")+" Operation cancelled"),new Error}}),{repoId:f}=x;if(f==="exit")return;if(f==="add"){let y=await fe();return e.push(y),B(e),r()}let j=e.findIndex(y=>y.id===f),b=await H([{type:"select",name:"action",message:F("Select an action?"),choices:[{title:"Edit",value:"edit"},{title:"Remove",value:"remove"},{title:"Exit",value:"exit"}]},{type:y=>y==="remove"&&"toggle",name:"confirmRemove",message:F("Where confirm to remove?"),initial:!0,active:"Yes",inactive:"No"}],{onCancel:()=>{throw console.log($("\u2716")+" Operation cancelled"),new Error}}),{action:E,confirmRemove:T}=b;if(E==="exit")return q();if(E==="remove")return T&&(e.splice(j,1),B(e)),r();let N=await fe(e[j]);return e[j]=N,B(e),r()}}var Q=R(ze(process.argv.slice(2),{string:["_"]})),X=process.cwd(),Ye=["test","vite","electron","examples"],Ee=[{name:"web",display:"Web App",color:D,variants:[{name:"vue",display:"Vue",color:D},{name:"react",display:"React",color:C}]},{name:"electron",display:"Electron App",color:C,variants:[{name:"electron-vue",display:"Vue",color:D},{name:"electron-react",display:"React",color:C}]},{name:"vscode",display:"VSCode Extension",color:We,options:[{id:"publish",name:"Git Repository"},{id:"ssh",name:"Git init by SSH"}],variants:[{name:"vscode",display:"Base",color:xe},{name:"vscode-vue",display:"Vue",color:D},{name:"vscode-react",display:"React",color:C}]},{name:"node",display:"Node",color:xe,options:[{id:"test",name:"Test"},{id:"publish",name:"Git Repository + NPM Publish"},{id:"ssh",name:"Git init by SSH"},{id:"vite",name:"Vite Plugin"},{id:"electron",name:"Electron"},{id:"examples",name:"Examples"}]}],je=Ee.map(e=>e.variants&&e.variants.map(r=>r.name)||[e.name]).reduce((e,r)=>e.concat(r),[]),Z="my-app";function ke(e){let r=G.exec(`git config --get ${e}`,{silent:!0});if(r.code===0)return r.stdout.trim()}function be(e){return e.length>1?e.substring(e.indexOf("/")+1):e}async function Be(){let e=z(Q._[0]),r=Q.template||Q.t,l=e||Z,x=()=>l==="."?c.basename(c.resolve()):l,f=be(l),{gitRepos:j}=O(),b=await Le([{type:e?null:"text",name:"projectName",message:w("Project name:"),initial:Z,onState:t=>{l=z(t.value)||Z,f=be(l)}},{type:()=>!s.existsSync(f)||ce(f)?null:"toggle",name:"overwrite",message:()=>(f==="."?"Current directory":`Target directory "${f}"`)+" is not empty. Remove existing files and continue?",initial:!1,active:"Yes",inactive:"No"},{type:(t,{overwrite:n})=>{if(n===!1)throw console.log(Se("\u2716")+" Operation cancelled"),new Error;return null},name:"overwriteChecker"},{type:()=>Y(x())?null:"text",name:"packageName",message:w("Package name:"),initial:()=>le(x()),validate:t=>Y(t)||"Invalid package.json name"},{type:r&&je.includes(r)?null:"select",name:"framework",message:typeof r=="string"&&!je.includes(r)?w(`"${r}" isn't a valid template. Please choose from below: `):w("Select a framework:"),initial:0,choices:Ee.map(t=>{let n=t.color;return{title:n(t.display||t.name),value:t}})},{type:t=>t&&t.variants?"select":null,name:"variant",message:w("Select a variant:"),choices:t=>t?.variants?.map(n=>{let i=n.color;return{title:i(n.display||n.name),value:n.name}})},{type:(t,n)=>{let{framework:i}=n;return i&&Array.isArray(i.options)&&i.options.length?"multiselect":null},name:"options",message:w("Select optional options:"),instructions:!1,choices:(t,n)=>{let{framework:i}=n;return i?.options?.map(o=>({title:o.name,value:o.id}))}},{type:(t,n)=>j.length&&Array.isArray(n.options)&&n.options.includes("publish")?"select":null,name:"gitUserUrl",message:w("Which git repository to publish to?"),choices:j.map(t=>{let n=K(t);return{title:n,value:n}})}],{onCancel:()=>{throw console.log(Se("\u2716")+" Operation cancelled"),new Error}}),{framework:E,overwrite:T,packageName:N,variant:y,gitUserUrl:ee}=b,g=b.options||[],a=c.join(X,f);T?ae(a):s.existsSync(a)||s.mkdirSync(a,{recursive:!0}),console.log(`
4
+ Scaffolding project in ${a}...`);let _=y||E?.name||r||"",U=t=>c.join(Je(import.meta.url),"../..",`template-${t}`),Pe=U(_),I=_.includes("node");[Pe,U("config")].forEach(t=>{let n=s.readdirSync(t);for(let i of n){let o=i.startsWith("_")?i.replace("_","."):i;if((I&&!g.includes("examples")||_==="vscode")&&i.includes("stylelint"))continue;let u=c.join(a,o);L(c.join(t,i),u)}});let m=N||x(),P={name:ke("user.name")||Ve.userInfo().username,email:ke("user.email")||""},V={"pkg.name":m,"git.name":P.name,"git.email":P.email,"git.url":Re(),"git.fullUrl":te()};function Re(){let t=m.startsWith("@")?m.split("/")[0].substring(1):we(P.name);return`${ee||`https://github.com/${t}`}/${m.substring(m.indexOf("/")+1)}`}function te(t=!1){let n=m.startsWith("@")?m.split("/")[0].substring(1):we(P.name),i=ee||`https://github.com/${n}`;return t&&(i=i.replace(/http(s):\/\//g,"git@").replace(/\//,":")),`${i}/${m.substring(m.indexOf("/")+1)}.git`}$e(),I&&(Ae(),Ce(),De());let ne=pe(process.env.npm_config_user_agent),J=ne?ne.name:"npm";G.which("git")&&(G.exec(`cd ${a} && git init`),g.includes("publish")&&G.exec(`cd ${a} && git remote add origin ${te(g.includes("ssh"))}`));let W=c.relative(X,a);switch(console.log(`
5
5
  Done. Now run:
6
- `),c!==Q&&console.log(` cd ${J.includes(" ")?`"${J}"`:J}`),V){case"yarn":console.log(" yarn"),console.log(" yarn dev");break;default:console.log(` ${V} install`),console.log(` ${V} run dev`);break}function be(){Re(".lintstagedrc.cjs","jest.config.cjs","tsconfig.json","tsup.config.ts");let t=m.find(n=>["vite"].includes(n)),o=["#pnpm",`pnpm add ${d}${t?" -D":""}`,"","#yarn",`yarn add ${d}${t?" -D":""}`,"","#npm",`npm i ${d}${t?" --save-dev":""}`].join(`
7
- `);["LICENSE","README.md","README.zh_CN.md"].forEach(n=>{let s=r.join(c,n);if(!m.includes("publish")&&a.existsSync(s)){a.rmSync(s),n==="README.md"&&a.writeFileSync(s,`# ${d}
8
- `,{encoding:"utf-8"});return}if(!a.existsSync(s))return;let g=a.readFileSync(s,"utf-8").replace(new RegExp("{{pkg.name}}","g"),d).replace(new RegExp("{{pkg.install}}","g"),o).replace(new RegExp("{{user.name}}","g"),j.name).replace(new RegExp("{{user.email}}","g"),j.email);a.writeFileSync(s,g)})}function k(t,...o){["dependencies","devDependencies"].forEach(n=>{Object.keys(t[n]||{}).forEach(s=>{o.find(g=>s.includes(g))&&delete t[n][s]})})}function te(...t){!Array.isArray(t)||t.length===0||t.forEach(o=>{let n=r.join(c,o);a.existsSync(n)&&$(n)})}function Ee(){let t=x(r.join(c,"package.json"));t.name=d,m.includes("publish")?(E.which("git")&&(j.name=xe("user.name")||Te.userInfo().username,j.email=xe("user.email")||"",t.author=Object.assign({},t.author,j)),t.publishConfig={access:"public",registry:"https://registry.npmjs.org/"},t.repository??={type:"git"},t.repository.url=`git+${Z()}`):(delete t.author,delete t.publishConfig,delete t.repository,delete t.scripts.prepublishOnly,delete t.devDependencies.np),I&&(m.includes("electron")||(k(t,"electron"),t.scripts["lint:eslint"]=t.scripts["lint:eslint"].replace(",electron","")),m.includes("vite")||k(t,"vite")),h(r.join(c,"package.json"),t)}function Pe(t,o){let n=t.lastIndexOf("."),s=t.substring(0,n)+"."+o+t.substring(n),g=r.join(c,t),y=r.join(c,s);a.existsSync(y)&&(m.includes(o)?($(g),Ne(y,g)):$(y))}function Re(...t){t.forEach(o=>{We.forEach(n=>{Pe(o,n)})})}function Ae(){let t=r.join(c,"package.json"),o=x(t);if(m.includes("test")){if(m.includes("electron")){k(o,"vitest"),h(t,o);let n=r.join(c,"test/simple.test.ts");if(a.existsSync(n)){let s=a.readFileSync(n,{encoding:"utf8"});a.writeFileSync(n,s.replace("import { describe, expect, it } from 'vitest';",""),{encoding:"utf8"})}}else te("jest.config.cjs");return}delete o.scripts.test,o.scripts["lint:eslint"]=o.scripts["lint:eslint"].replace(",test",""),k(o,"jest","vitest"),te(".lintstagedrc.cjs","jest.config.cjs","test"),h(t,o)}function $e(){if(!m.includes("examples")){let n=x(r.join(c,"package.json"));n.scripts.lint=n.scripts.lint.replace(" lint:stylelint",""),n.scripts["lint:eslint"]=n.scripts["lint:eslint"].replace(",examples",""),delete n.scripts["lint:stylelint"],k(n,"stylelint"),h(r.join(c,"package.json"),n);return}let t=r.join(c,"examples");a.mkdirSync(t);let o=m.includes("electron");["vue","react"].forEach(n=>{let s=U(o?`electron-${n}`:n),g=r.join(t,n);if(!a.existsSync(s)){console.log(`${Ie(s)} template is not exist`);return}a.cpSync(s,g,{recursive:!0});let y=x(r.join(g,"package.json"));Object.keys(y.scripts).forEach(b=>{(b.startsWith("lint")||["prepare"].includes(b))&&delete y.scripts[b]}),k(y,"eslint","prettier","stylelint","commitlint","husky","lint-staged","tsconfig","lint-staged","npm-run-all"),h(r.join(g,"package.json"),y),["_lintstagedrc.cjs"].forEach(b=>{let ne=r.join(g,b);a.existsSync(ne)&&a.rmSync(ne,{recursive:!0})})}),a.writeFileSync(r.join(c,"pnpm-workspace.yaml"),`packages:
9
- - 'examples/*'`,{encoding:"utf-8"})}}K().then(async()=>ze().catch(e=>{e.message&&console.error(e)})).catch(e=>{e.message&&console.error(e)});
6
+ `),a!==X&&console.log(` cd ${W.includes(" ")?`"${W}"`:W}`),J){case"yarn":console.log(" yarn"),console.log(" yarn dev");break;default:console.log(` ${J} install`),console.log(` ${J} run dev`);break}function Ae(){Oe(".lintstagedrc.cjs","jest.config.cjs","tsconfig.json","tsup.config.ts");let t=g.find(i=>["vite"].includes(i)),n=["#pnpm",`pnpm add ${m}${t?" -D":""}`,"","#yarn",`yarn add ${m}${t?" -D":""}`,"","#npm",`npm i ${m}${t?" --save-dev":""}`].join(`
7
+ `);["LICENSE","README.md","README.zh_CN.md"].forEach(i=>{let o=c.join(a,i);if(!g.includes("publish")&&s.existsSync(o)){s.rmSync(o),i==="README.md"&&s.writeFileSync(o,`# ${m}
8
+ `,{encoding:"utf-8"});return}if(!s.existsSync(o))return;let u=Object.assign({},V,{"pkg.install":n}),d=s.readFileSync(o,"utf-8");Object.keys(u).forEach(h=>{d=d.replace(new RegExp("{{"+h+"}}","g"),u[h])}),s.writeFileSync(o,d,"utf8")})}function k(t,...n){["dependencies","devDependencies"].forEach(i=>{Object.keys(t[i]||{}).forEach(o=>{n.find(u=>o.includes(u))&&delete t[i][o]})})}function ie(...t){!Array.isArray(t)||t.length===0||t.forEach(n=>{let i=c.join(a,n);s.existsSync(i)&&A(i)})}function $e(){let t=c.join(a,"package.json"),n=S(t);n.name=m,g.includes("publish")||(delete n.author,delete n.publishConfig,delete n.repository,delete n.scripts.prepublishOnly,delete n.devDependencies.np),I&&(g.includes("electron")||(k(n,"electron"),n.scripts["lint:eslint"]=n.scripts["lint:eslint"].replace(",electron","")),g.includes("vite")||k(n,"vite")),v(t,n);let i=me(t);Object.keys(V).forEach(o=>{i=i.replace(new RegExp("{{"+o+"}}","g"),V[o])}),s.writeFileSync(t,i)}function Fe(t,n){let i=t.lastIndexOf("."),o=t.substring(0,i)+"."+n+t.substring(i),u=c.join(a,t),d=c.join(a,o);s.existsSync(d)&&(g.includes(n)?(A(u),Ie(d,u)):A(d))}function Oe(...t){t.forEach(n=>{Ye.forEach(i=>{Fe(n,i)})})}function Ce(){let t=c.join(a,"package.json"),n=S(t);if(g.includes("test")){if(g.includes("electron")){k(n,"vitest"),v(t,n);let i=c.join(a,"test/simple.test.ts");if(s.existsSync(i)){let o=s.readFileSync(i,{encoding:"utf8"});s.writeFileSync(i,o.replace("import { describe, expect, it } from 'vitest';",""),{encoding:"utf8"})}}else ie("jest.config.cjs");return}delete n.scripts.test,n.scripts["lint:eslint"]=n.scripts["lint:eslint"].replace(",test",""),k(n,"jest","vitest"),ie(".lintstagedrc.cjs","jest.config.cjs","test"),v(t,n)}function De(){if(!g.includes("examples")){let i=S(c.join(a,"package.json"));i.scripts.lint=i.scripts.lint.replace(" lint:stylelint",""),i.scripts["lint:eslint"]=i.scripts["lint:eslint"].replace(",examples",""),delete i.scripts["lint:stylelint"],k(i,"stylelint"),v(c.join(a,"package.json"),i);return}let t=c.join(a,"examples");s.mkdirSync(t);let n=g.includes("electron");["vue","react"].forEach(i=>{let o=U(n?`electron-${i}`:i),u=c.join(t,i);if(!s.existsSync(o)){console.log(`${Me(o)} template is not exist`);return}s.cpSync(o,u,{recursive:!0});let d=S(c.join(u,"package.json"));Object.keys(d.scripts).forEach(h=>{(h.startsWith("lint")||["prepare"].includes(h))&&delete d.scripts[h]}),k(d,"eslint","prettier","stylelint","commitlint","husky","lint-staged","tsconfig","lint-staged","npm-run-all"),v(c.join(u,"package.json"),d),["_lintstagedrc.cjs"].forEach(h=>{let re=c.join(u,h);s.existsSync(re)&&s.rmSync(re,{recursive:!0})})}),s.writeFileSync(c.join(a,"pnpm-workspace.yaml"),`packages:
9
+ - 'examples/*'`,{encoding:"utf-8"})}}q().then(async()=>Be().catch(e=>{e.message&&console.error(e)})).catch(e=>{e.message&&console.error(e)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomjs/create-app",
3
- "version": "0.10.3",
3
+ "version": "0.11.1",
4
4
  "description": "create tomjs web app",
5
5
  "keywords": [
6
6
  "tomjs",
@@ -67,7 +67,7 @@
67
67
  "lint-staged": "^15.2.0",
68
68
  "np": "^9.2.0",
69
69
  "npm-run-all": "^4.1.5",
70
- "prettier": "^3.2.1",
70
+ "prettier": "^3.2.2",
71
71
  "stylelint": "^16.1.0",
72
72
  "tsup": "^8.0.1",
73
73
  "typescript": "~5.3.3"
@@ -43,7 +43,7 @@
43
43
  "husky": "^8.0.3",
44
44
  "lint-staged": "^15.2.0",
45
45
  "npm-run-all": "^4.1.5",
46
- "prettier": "^3.2.1",
46
+ "prettier": "^3.2.2",
47
47
  "rimraf": "^5.0.5",
48
48
  "stylelint": "^16.1.0",
49
49
  "tsx": "^4.7.0",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@tomjs/electron-devtools-installer": "^2.1.0",
24
- "vue": "^3.4.11"
24
+ "vue": "^3.4.13"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@commitlint/cli": "^18.4.4",
@@ -40,7 +40,7 @@
40
40
  "husky": "^8.0.3",
41
41
  "lint-staged": "^15.2.0",
42
42
  "npm-run-all": "^4.1.5",
43
- "prettier": "^3.2.1",
43
+ "prettier": "^3.2.2",
44
44
  "rimraf": "^5.0.5",
45
45
  "stylelint": "^16.1.0",
46
46
  "tsx": "^4.7.0",
@@ -6,8 +6,8 @@
6
6
  "node"
7
7
  ],
8
8
  "author": {
9
- "name": "name",
10
- "email": "name@github.com"
9
+ "name": "{{git.name}}",
10
+ "email": "{{git.email}}"
11
11
  },
12
12
  "license": "MIT",
13
13
  "main": "./dist/index.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",
35
- "url": "git+https://github.com/xxx/node-template.git"
35
+ "url": "git+{{git.url}}.git"
36
36
  },
37
37
  "scripts": {
38
38
  "dev": "tsup --watch",
@@ -68,7 +68,7 @@
68
68
  "lint-staged": "^15.2.0",
69
69
  "np": "^9.2.0",
70
70
  "npm-run-all": "^4.1.5",
71
- "prettier": "^3.2.1",
71
+ "prettier": "^3.2.2",
72
72
  "rimraf": "^5.0.5",
73
73
  "stylelint": "^16.1.0",
74
74
  "ts-jest": "^29.1.1",
@@ -36,7 +36,7 @@
36
36
  "husky": "^8.0.3",
37
37
  "lint-staged": "^15.2.0",
38
38
  "npm-run-all": "^4.1.5",
39
- "prettier": "^3.2.1",
39
+ "prettier": "^3.2.2",
40
40
  "stylelint": "^16.1.0",
41
41
  "typescript": "~5.3.3",
42
42
  "vite": "^5.0.11"
@@ -0,0 +1,71 @@
1
+ # logs
2
+ *.log
3
+ lerna-debug.log*
4
+ logs
5
+ npm-debug.log*
6
+ pnpm-debug.log*
7
+ yarn-debug.log*
8
+ yarn-error.log*
9
+
10
+ # diagnostic reports (https://nodejs.org/api/report.html)
11
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12
+
13
+ # runtime data
14
+ *.pid
15
+ *.pid.lock
16
+ *.seed
17
+ pids
18
+
19
+ # dependency directory
20
+ node_modules
21
+
22
+ # cache
23
+ .cache
24
+ .npm
25
+ .tmp
26
+ .temp
27
+ .eslintcache
28
+ .stylelintcache
29
+ tsconfig.tsbuildinfo
30
+
31
+ # environment
32
+ *.local
33
+
34
+ # macOS
35
+ .DS_Store
36
+
37
+ # package files
38
+ *.7z
39
+ *.gz
40
+ *.gzip
41
+ *.rar
42
+ *.tar
43
+ *.tar.*
44
+ *.tgz
45
+ *.zip
46
+ *.vsix
47
+
48
+ # IDEA
49
+ .idea
50
+
51
+ # vscode
52
+ .vscode
53
+ .history
54
+
55
+ # project
56
+ src
57
+
58
+ .husky
59
+ .commitlintrc*
60
+ .editorconfig
61
+ .eslintrc*
62
+ .eslintignore
63
+ .gitattributes
64
+ .gitignore
65
+ .lintstagedrc*
66
+ .prettierrc*
67
+ .prettierignore
68
+ pnpm-lock.yaml
69
+ tsconfig.json
70
+ tsconfig.*.json
71
+ *.config.ts
@@ -1,64 +1,3 @@
1
1
  # extension
2
2
 
3
3
  vscode extension
4
-
5
- ## Debug
6
-
7
- Run `Debug Extension` through `vscode` to debug. For debugging tools, refer to [Official Documentation](https://code.visualstudio.com/docs/editor/debugging)
8
-
9
- `launch.json` is configured as follows:
10
-
11
- ```json
12
- {
13
- "version": "0.2.0",
14
- "configurations": [
15
- {
16
- "name": "Debug Extension",
17
- "type": "extensionHost",
18
- "request": "launch",
19
- "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
20
- "outFiles": ["${workspaceFolder}/dist/*.js"],
21
- "preLaunchTask": "${defaultBuildTask}"
22
- }
23
- ]
24
- }
25
- ```
26
-
27
- `tasks.json` is configured as follows:
28
-
29
- ```json
30
- {
31
- "version": "2.0.0",
32
- "tasks": [
33
- {
34
- "type": "npm",
35
- "script": "dev",
36
- "problemMatcher": {
37
- "owner": "typescript",
38
- "fileLocation": "relative",
39
- "pattern": {
40
- "regexp": "^([a-zA-Z]\\:/?([\\w\\-]/?)+\\.\\w+):(\\d+):(\\d+): (ERROR|WARNING)\\: (.*)$",
41
- "file": 1,
42
- "line": 3,
43
- "column": 4,
44
- "code": 5,
45
- "message": 6
46
- },
47
- "background": {
48
- "activeOnStart": true,
49
- "beginsPattern": "^.*extension build start*$",
50
- "endsPattern": "^.*extension (build|rebuild) success.*$"
51
- }
52
- },
53
- "isBackground": true,
54
- "presentation": {
55
- "reveal": "never"
56
- },
57
- "group": {
58
- "kind": "build",
59
- "isDefault": true
60
- }
61
- }
62
- ]
63
- }
64
- ```
Binary file
@@ -1,11 +1,7 @@
1
1
  {
2
- "name": "template-vscode",
2
+ "name": "{{pkg.name}}",
3
3
  "version": "0.0.0",
4
4
  "description": "vscode extension template",
5
- "author": {
6
- "name": "name",
7
- "email": "name@github.com"
8
- },
9
5
  "license": "MIT",
10
6
  "engines": {
11
7
  "node": ">=14",
@@ -23,13 +19,18 @@
23
19
  }
24
20
  ]
25
21
  },
26
- "publishConfig": {
27
- "access": "public",
28
- "registry": "https://registry.npmjs.org/"
29
- },
30
22
  "repository": {
31
23
  "type": "git",
32
- "url": "git+https://github.com/xxx/template.git"
24
+ "url": "git+{{git.url}}.git"
25
+ },
26
+ "bugs": {
27
+ "url": "git+{{git.url}}/issues"
28
+ },
29
+ "homepage": "{{git.url}}/blob/main/README.md",
30
+ "icon": "images/icon.png",
31
+ "vsce": {
32
+ "dependencies": false,
33
+ "yarn": false
33
34
  },
34
35
  "scripts": {
35
36
  "dev": "tsup --watch",
@@ -53,7 +54,7 @@
53
54
  "husky": "^8.0.3",
54
55
  "lint-staged": "^15.2.0",
55
56
  "npm-run-all": "^4.1.5",
56
- "prettier": "^3.2.1",
57
+ "prettier": "^3.2.2",
57
58
  "rimraf": "^5.0.5",
58
59
  "tsup": "^8.0.1",
59
60
  "tsx": "^4.7.0",
@@ -0,0 +1,72 @@
1
+ # logs
2
+ *.log
3
+ lerna-debug.log*
4
+ logs
5
+ npm-debug.log*
6
+ pnpm-debug.log*
7
+ yarn-debug.log*
8
+ yarn-error.log*
9
+
10
+ # diagnostic reports (https://nodejs.org/api/report.html)
11
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12
+
13
+ # runtime data
14
+ *.pid
15
+ *.pid.lock
16
+ *.seed
17
+ pids
18
+
19
+ # dependency directory
20
+ node_modules
21
+
22
+ # cache
23
+ .cache
24
+ .npm
25
+ .tmp
26
+ .temp
27
+ .eslintcache
28
+ .stylelintcache
29
+ tsconfig.tsbuildinfo
30
+
31
+ # environment
32
+ *.local
33
+
34
+ # macOS
35
+ .DS_Store
36
+
37
+ # package files
38
+ *.7z
39
+ *.gz
40
+ *.gzip
41
+ *.rar
42
+ *.tar
43
+ *.tar.*
44
+ *.tgz
45
+ *.zip
46
+ *.vsix
47
+
48
+ # IDEA
49
+ .idea
50
+
51
+ # vscode
52
+ .vscode
53
+ .history
54
+
55
+ # project
56
+ src
57
+ extension
58
+
59
+ .husky
60
+ .commitlintrc*
61
+ .editorconfig
62
+ .eslintrc*
63
+ .eslintignore
64
+ .gitattributes
65
+ .gitignore
66
+ .lintstagedrc*
67
+ .prettierrc*
68
+ .prettierignore
69
+ pnpm-lock.yaml
70
+ tsconfig.json
71
+ tsconfig.*.json
72
+ *.config.ts
@@ -1,87 +1,3 @@
1
- # extension-vue
1
+ # extension-react
2
2
 
3
- vite + extension + vue
4
-
5
- ## Description
6
-
7
- - Recommend `extension` and page `src` code directory structure
8
-
9
- ```
10
- |--extension // extension code
11
- | |--index.ts
12
- |--src // front-end code
13
- | |--App.vue
14
- | |--main.ts
15
- ```
16
-
17
- - Zero configuration, default dist output directory
18
-
19
- ```
20
- |--dist
21
- | |--extension
22
- | | |--index.js
23
- | | |--index.js.map
24
- | |--webview
25
- | | |--index.html
26
- ```
27
-
28
- ## Debug
29
-
30
- Run `Debug Extension` through `vscode` to debug. For debugging tools, refer to [Official Documentation](https://code.visualstudio.com/docs/editor/debugging)
31
-
32
- `launch.json` is configured as follows:
33
-
34
- ```json
35
- {
36
- "version": "0.2.0",
37
- "configurations": [
38
- {
39
- "name": "Debug Extension",
40
- "type": "extensionHost",
41
- "request": "launch",
42
- "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
43
- "outFiles": ["${workspaceFolder}/dist/extension/*.js"],
44
- "preLaunchTask": "${defaultBuildTask}"
45
- }
46
- ]
47
- }
48
- ```
49
-
50
- `tasks.json` is configured as follows:
51
-
52
- ```json
53
- {
54
- "version": "2.0.0",
55
- "tasks": [
56
- {
57
- "type": "npm",
58
- "script": "dev",
59
- "problemMatcher": {
60
- "owner": "typescript",
61
- "fileLocation": "relative",
62
- "pattern": {
63
- "regexp": "^([a-zA-Z]\\:/?([\\w\\-]/?)+\\.\\w+):(\\d+):(\\d+): (ERROR|WARNING)\\: (.*)$",
64
- "file": 1,
65
- "line": 3,
66
- "column": 4,
67
- "code": 5,
68
- "message": 6
69
- },
70
- "background": {
71
- "activeOnStart": true,
72
- "beginsPattern": "^.*extension build start*$",
73
- "endsPattern": "^.*extension (build|rebuild) success.*$"
74
- }
75
- },
76
- "isBackground": true,
77
- "presentation": {
78
- "reveal": "never"
79
- },
80
- "group": {
81
- "kind": "build",
82
- "isDefault": true
83
- }
84
- }
85
- ]
86
- }
87
- ```
3
+ vite + extension + react
@@ -1,7 +1,8 @@
1
1
  {
2
- "name": "template-vscode",
2
+ "name": "{{pkg.name}}",
3
3
  "version": "0.0.0",
4
4
  "description": "vite + vscode + react",
5
+ "keywords": [],
5
6
  "engines": {
6
7
  "node": ">=14",
7
8
  "vscode": "^1.56.0"
@@ -18,13 +19,18 @@
18
19
  }
19
20
  ]
20
21
  },
21
- "publishConfig": {
22
- "access": "public",
23
- "registry": "https://registry.npmjs.org/"
24
- },
25
22
  "repository": {
26
23
  "type": "git",
27
- "url": "git+https://github.com/xxx/template.git"
24
+ "url": "git+{{git.url}}.git"
25
+ },
26
+ "bugs": {
27
+ "url": "git+{{git.url}}/issues"
28
+ },
29
+ "homepage": "{{git.url}}/blob/main/README.md",
30
+ "icon": "images/icon.png",
31
+ "vsce": {
32
+ "dependencies": false,
33
+ "yarn": false
28
34
  },
29
35
  "scripts": {
30
36
  "dev": "vite",
@@ -61,7 +67,7 @@
61
67
  "husky": "^8.0.3",
62
68
  "lint-staged": "^15.2.0",
63
69
  "npm-run-all": "^4.1.5",
64
- "prettier": "^3.2.1",
70
+ "prettier": "^3.2.2",
65
71
  "rimraf": "^5.0.5",
66
72
  "stylelint": "^16.1.0",
67
73
  "tsx": "^4.7.0",
@@ -0,0 +1,72 @@
1
+ # logs
2
+ *.log
3
+ lerna-debug.log*
4
+ logs
5
+ npm-debug.log*
6
+ pnpm-debug.log*
7
+ yarn-debug.log*
8
+ yarn-error.log*
9
+
10
+ # diagnostic reports (https://nodejs.org/api/report.html)
11
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12
+
13
+ # runtime data
14
+ *.pid
15
+ *.pid.lock
16
+ *.seed
17
+ pids
18
+
19
+ # dependency directory
20
+ node_modules
21
+
22
+ # cache
23
+ .cache
24
+ .npm
25
+ .tmp
26
+ .temp
27
+ .eslintcache
28
+ .stylelintcache
29
+ tsconfig.tsbuildinfo
30
+
31
+ # environment
32
+ *.local
33
+
34
+ # macOS
35
+ .DS_Store
36
+
37
+ # package files
38
+ *.7z
39
+ *.gz
40
+ *.gzip
41
+ *.rar
42
+ *.tar
43
+ *.tar.*
44
+ *.tgz
45
+ *.zip
46
+ *.vsix
47
+
48
+ # IDEA
49
+ .idea
50
+
51
+ # vscode
52
+ .vscode
53
+ .history
54
+
55
+ # project
56
+ src
57
+ extension
58
+
59
+ .husky
60
+ .commitlintrc*
61
+ .editorconfig
62
+ .eslintrc*
63
+ .eslintignore
64
+ .gitattributes
65
+ .gitignore
66
+ .lintstagedrc*
67
+ .prettierrc*
68
+ .prettierignore
69
+ pnpm-lock.yaml
70
+ tsconfig.json
71
+ tsconfig.*.json
72
+ *.config.ts
@@ -1,87 +1,3 @@
1
1
  # extension-vue
2
2
 
3
3
  vite + extension + vue
4
-
5
- ## Description
6
-
7
- - Recommend `extension` and page `src` code directory structure
8
-
9
- ```
10
- |--extension // extension code
11
- | |--index.ts
12
- |--src // front-end code
13
- | |--App.vue
14
- | |--main.ts
15
- ```
16
-
17
- - Zero configuration, default dist output directory
18
-
19
- ```
20
- |--dist
21
- | |--extension
22
- | | |--index.js
23
- | | |--index.js.map
24
- | |--webview
25
- | | |--index.html
26
- ```
27
-
28
- ## Debug
29
-
30
- Run `Debug Extension` through `vscode` to debug. For debugging tools, refer to [Official Documentation](https://code.visualstudio.com/docs/editor/debugging)
31
-
32
- `launch.json` is configured as follows:
33
-
34
- ```json
35
- {
36
- "version": "0.2.0",
37
- "configurations": [
38
- {
39
- "name": "Debug Extension",
40
- "type": "extensionHost",
41
- "request": "launch",
42
- "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
43
- "outFiles": ["${workspaceFolder}/dist/extension/*.js"],
44
- "preLaunchTask": "${defaultBuildTask}"
45
- }
46
- ]
47
- }
48
- ```
49
-
50
- `tasks.json` is configured as follows:
51
-
52
- ```json
53
- {
54
- "version": "2.0.0",
55
- "tasks": [
56
- {
57
- "type": "npm",
58
- "script": "dev",
59
- "problemMatcher": {
60
- "owner": "typescript",
61
- "fileLocation": "relative",
62
- "pattern": {
63
- "regexp": "^([a-zA-Z]\\:/?([\\w\\-]/?)+\\.\\w+):(\\d+):(\\d+): (ERROR|WARNING)\\: (.*)$",
64
- "file": 1,
65
- "line": 3,
66
- "column": 4,
67
- "code": 5,
68
- "message": 6
69
- },
70
- "background": {
71
- "activeOnStart": true,
72
- "beginsPattern": "^.*extension build start*$",
73
- "endsPattern": "^.*extension (build|rebuild) success.*$"
74
- }
75
- },
76
- "isBackground": true,
77
- "presentation": {
78
- "reveal": "never"
79
- },
80
- "group": {
81
- "kind": "build",
82
- "isDefault": true
83
- }
84
- }
85
- ]
86
- }
87
- ```
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "template-vscode",
2
+ "name": "{{pkg.name}}",
3
3
  "version": "0.0.0",
4
4
  "description": "vite + vscode + vue",
5
5
  "engines": {
@@ -18,13 +18,18 @@
18
18
  }
19
19
  ]
20
20
  },
21
- "publishConfig": {
22
- "access": "public",
23
- "registry": "https://registry.npmjs.org/"
24
- },
25
21
  "repository": {
26
22
  "type": "git",
27
- "url": "git+https://github.com/xxx/node-template.git"
23
+ "url": "git+{{git.url}}.git"
24
+ },
25
+ "bugs": {
26
+ "url": "git+{{git.url}}/issues"
27
+ },
28
+ "homepage": "{{git.url}}/blob/main/README.md",
29
+ "icon": "images/icon.png",
30
+ "vsce": {
31
+ "dependencies": false,
32
+ "yarn": false
28
33
  },
29
34
  "scripts": {
30
35
  "dev": "vite",
@@ -38,7 +43,7 @@
38
43
  },
39
44
  "dependencies": {
40
45
  "@vscode/webview-ui-toolkit": "^1.4.0",
41
- "vue": "^3.4.11"
46
+ "vue": "^3.4.13"
42
47
  },
43
48
  "devDependencies": {
44
49
  "@commitlint/cli": "^18.4.4",
@@ -58,7 +63,7 @@
58
63
  "husky": "^8.0.3",
59
64
  "lint-staged": "^15.2.0",
60
65
  "npm-run-all": "^4.1.5",
61
- "prettier": "^3.2.1",
66
+ "prettier": "^3.2.2",
62
67
  "rimraf": "^5.0.5",
63
68
  "stylelint": "^16.1.0",
64
69
  "tsx": "^4.7.0",
@@ -17,7 +17,7 @@
17
17
  "prepare": "husky install"
18
18
  },
19
19
  "dependencies": {
20
- "vue": "^3.4.11"
20
+ "vue": "^3.4.13"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@commitlint/cli": "^18.4.4",
@@ -33,7 +33,7 @@
33
33
  "husky": "^8.0.3",
34
34
  "lint-staged": "^15.2.0",
35
35
  "npm-run-all": "^4.1.5",
36
- "prettier": "^3.2.1",
36
+ "prettier": "^3.2.2",
37
37
  "stylelint": "^16.1.0",
38
38
  "typescript": "~5.3.3",
39
39
  "vite": "^5.0.11",
@@ -1,14 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
7
- <title>Vite + VSCode Extension + Vue</title>
8
- </head>
9
-
10
- <body>
11
- <div id="app"></div>
12
- <script type="module" src="/src/main.ts"></script>
13
- </body>
14
- </html>