@tomjs/create-app 0.14.2 → 1.0.0-alpha.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 +25 -0
- package/package.json +29 -25
- package/dist/index.mjs +0 -11
- package/template-config/.commitlintrc.cjs +0 -3
- package/template-config/.editorconfig +0 -15
- package/template-config/.eslintignore +0 -14
- package/template-config/.gitattributes +0 -203
- package/template-config/.husky/commit-msg +0 -1
- package/template-config/.husky/pre-commit +0 -1
- package/template-config/.prettierignore +0 -17
- package/template-config/.prettierrc.cjs +0 -1
- package/template-config/.stylelintignore +0 -16
- package/template-config/.stylelintrc.cjs +0 -3
- package/template-config/_gitignore +0 -60
- package/template-electron-react/.vscode/launch.json +0 -28
- package/template-electron-react/.vscode/tasks.json +0 -37
- package/template-electron-react/README.md +0 -97
- package/template-electron-react/_eslintrc.cjs +0 -7
- package/template-electron-react/_lintstagedrc.cjs +0 -5
- package/template-electron-react/electron/env.d.ts +0 -1
- package/template-electron-react/electron/main/index.ts +0 -127
- package/template-electron-react/electron/polyfills.ts +0 -4
- package/template-electron-react/electron/preload/index.ts +0 -1
- package/template-electron-react/index.html +0 -15
- package/template-electron-react/package.json +0 -54
- package/template-electron-react/public/img/icon.png +0 -0
- package/template-electron-react/public/vite.svg +0 -1
- package/template-electron-react/src/App.css +0 -45
- package/template-electron-react/src/App.tsx +0 -42
- package/template-electron-react/src/assets/electron.svg +0 -10
- package/template-electron-react/src/assets/react.svg +0 -1
- package/template-electron-react/src/index.css +0 -69
- package/template-electron-react/src/main.tsx +0 -11
- package/template-electron-react/src/vite-env.d.ts +0 -1
- package/template-electron-react/tsconfig.json +0 -10
- package/template-electron-react/tsconfig.node.json +0 -7
- package/template-electron-react/vite.config.ts +0 -27
- package/template-electron-vue/.vscode/launch.json +0 -28
- package/template-electron-vue/.vscode/tasks.json +0 -37
- package/template-electron-vue/README.md +0 -92
- package/template-electron-vue/_eslintrc.cjs +0 -7
- package/template-electron-vue/_lintstagedrc.cjs +0 -6
- package/template-electron-vue/electron/env.d.ts +0 -1
- package/template-electron-vue/electron/main/index.ts +0 -122
- package/template-electron-vue/electron/polyfills.ts +0 -4
- package/template-electron-vue/electron/preload/index.ts +0 -1
- package/template-electron-vue/index.html +0 -15
- package/template-electron-vue/package.json +0 -52
- package/template-electron-vue/public/img/icon.png +0 -0
- package/template-electron-vue/public/vite.svg +0 -1
- package/template-electron-vue/src/App.vue +0 -55
- package/template-electron-vue/src/assets/electron.svg +0 -10
- package/template-electron-vue/src/assets/vue.svg +0 -1
- package/template-electron-vue/src/components/HelloWorld.vue +0 -43
- package/template-electron-vue/src/main.ts +0 -6
- package/template-electron-vue/src/style.css +0 -80
- package/template-electron-vue/src/vite-env.d.ts +0 -1
- package/template-electron-vue/tsconfig.json +0 -10
- package/template-electron-vue/tsconfig.node.json +0 -7
- package/template-electron-vue/vite.config.ts +0 -26
- package/template-node/.vscode/launch.json +0 -19
- package/template-node/.vscode/tasks.json +0 -36
- package/template-node/LICENSE +0 -21
- package/template-node/README.md +0 -13
- package/template-node/README.zh_CN.md +0 -13
- package/template-node/_eslintrc.cjs +0 -7
- package/template-node/_lintstagedrc.cjs +0 -4
- package/template-node/_lintstagedrc.examples.cjs +0 -6
- package/template-node/package.json +0 -81
- package/template-node/scripts/info.ts +0 -12
- package/template-node/src/index.ts +0 -3
- package/template-node/test/index.test.ts +0 -7
- package/template-node/tsconfig.json +0 -4
- package/template-node/tsconfig.test.json +0 -4
- package/template-node/tsup.config.ts +0 -16
- package/template-node/vite.config.ts +0 -42
- package/template-node/vitest.workspace.ts +0 -3
- package/template-react/README.md +0 -3
- package/template-react/_eslintrc.cjs +0 -7
- package/template-react/_lintstagedrc.cjs +0 -5
- package/template-react/index.html +0 -14
- package/template-react/package.json +0 -44
- package/template-react/public/vite.svg +0 -1
- package/template-react/src/App.css +0 -42
- package/template-react/src/App.tsx +0 -32
- package/template-react/src/assets/react.svg +0 -1
- package/template-react/src/index.css +0 -69
- package/template-react/src/main.tsx +0 -11
- package/template-react/src/vite-env.d.ts +0 -1
- package/template-react/tsconfig.json +0 -5
- package/template-react/tsconfig.node.json +0 -7
- package/template-react/vite.config.ts +0 -7
- package/template-vscode/.vscode/launch.json +0 -21
- package/template-vscode/.vscode/tasks.json +0 -36
- package/template-vscode/.vscodeignore +0 -71
- package/template-vscode/LICENSE +0 -21
- package/template-vscode/README.md +0 -3
- package/template-vscode/_eslintrc.cjs +0 -7
- package/template-vscode/_lintstagedrc.cjs +0 -5
- package/template-vscode/package.json +0 -66
- package/template-vscode/package.nls.json +0 -4
- package/template-vscode/package.nls.zh-cn.json +0 -4
- package/template-vscode/resources/logo.png +0 -0
- package/template-vscode/src/index.ts +0 -12
- package/template-vscode/tsconfig.json +0 -5
- package/template-vscode/tsup.config.ts +0 -13
- package/template-vscode-react/.vscode/launch.json +0 -21
- package/template-vscode-react/.vscode/tasks.json +0 -36
- package/template-vscode-react/.vscodeignore +0 -72
- package/template-vscode-react/LICENSE +0 -21
- package/template-vscode-react/README.md +0 -3
- package/template-vscode-react/_eslintrc.cjs +0 -7
- package/template-vscode-react/_lintstagedrc.cjs +0 -5
- package/template-vscode-react/extension/env.d.ts +0 -1
- package/template-vscode-react/extension/index.ts +0 -13
- package/template-vscode-react/extension/views/helper.ts +0 -27
- package/template-vscode-react/extension/views/panel.ts +0 -48
- package/template-vscode-react/index.html +0 -14
- package/template-vscode-react/package.json +0 -82
- package/template-vscode-react/package.nls.json +0 -4
- package/template-vscode-react/package.nls.zh-cn.json +0 -4
- package/template-vscode-react/resources/logo.png +0 -0
- package/template-vscode-react/src/App.css +0 -7
- package/template-vscode-react/src/App.tsx +0 -51
- package/template-vscode-react/src/main.tsx +0 -9
- package/template-vscode-react/src/utils/index.ts +0 -1
- package/template-vscode-react/src/utils/vscode.ts +0 -83
- package/template-vscode-react/src/vite-env.d.ts +0 -1
- package/template-vscode-react/tsconfig.json +0 -10
- package/template-vscode-react/tsconfig.node.json +0 -7
- package/template-vscode-react/vite.config.ts +0 -20
- package/template-vscode-vue/.vscode/launch.json +0 -21
- package/template-vscode-vue/.vscode/tasks.json +0 -36
- package/template-vscode-vue/.vscodeignore +0 -72
- package/template-vscode-vue/LICENSE +0 -21
- package/template-vscode-vue/README.md +0 -3
- package/template-vscode-vue/_eslintrc.cjs +0 -7
- package/template-vscode-vue/_lintstagedrc.cjs +0 -6
- package/template-vscode-vue/extension/env.d.ts +0 -1
- package/template-vscode-vue/extension/index.ts +0 -13
- package/template-vscode-vue/extension/views/helper.ts +0 -27
- package/template-vscode-vue/extension/views/panel.ts +0 -48
- package/template-vscode-vue/index.html +0 -14
- package/template-vscode-vue/package.json +0 -80
- package/template-vscode-vue/package.nls.json +0 -4
- package/template-vscode-vue/package.nls.zh-cn.json +0 -4
- package/template-vscode-vue/resources/logo.png +0 -0
- package/template-vscode-vue/src/App.vue +0 -58
- package/template-vscode-vue/src/main.ts +0 -4
- package/template-vscode-vue/src/utils/index.ts +0 -1
- package/template-vscode-vue/src/utils/vscode.ts +0 -83
- package/template-vscode-vue/src/vite-env.d.ts +0 -1
- package/template-vscode-vue/tsconfig.json +0 -10
- package/template-vscode-vue/tsconfig.node.json +0 -7
- package/template-vscode-vue/vite.config.ts +0 -29
- package/template-vue/README.md +0 -3
- package/template-vue/_eslintrc.cjs +0 -7
- package/template-vue/_lintstagedrc.cjs +0 -6
- package/template-vue/index.html +0 -14
- package/template-vue/package.json +0 -42
- package/template-vue/public/vite.svg +0 -1
- package/template-vue/src/App.vue +0 -32
- package/template-vue/src/assets/vue.svg +0 -1
- package/template-vue/src/components/HelloWorld.vue +0 -37
- package/template-vue/src/main.ts +0 -6
- package/template-vue/src/style.css +0 -80
- package/template-vue/src/vite-env.d.ts +0 -1
- package/template-vue/tsconfig.json +0 -5
- package/template-vue/tsconfig.node.json +0 -7
- package/template-vue/vite.config.ts +0 -7
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Ue from"meow";import w from"fs";import we from"os";import f from"path";import{fileURLToPath as he}from"url";import{copySync as xe,mkdirSync as G,readFileSync as ke,readJsonSync as oe,rmSync as M,writeFileSync as L,writeJsonSync as ve}from"@tomjs/node";import b from"chalk";import{camelCase as be,merge as Oe}from"lodash-es";import le from"@tomjs/logger";import{$ as ue}from"execa";import $ from"inquirer";var y=new le({directory:"create-app/logs"});function E(e,t,r){let s={message:e};return Array.isArray(t)||typeof t!="object"?s.default=t:Object.assign(s,t),Object.assign(s,r)}async function v(e,t){let r=`confirm-${Date.now()}`,s=E(e,t);return(await $.prompt([{type:"confirm",name:r,...s}]))[r]}async function I(e,t){let r=`input-${Date.now()}`,{required:s,...o}=E(e,t),i=s??!0,n=o.validate;return(i||n)&&(o.validate=c=>{let d=(c||"").trim();return i&&!d?"It's required!":n?n(c):!0}),(await $.prompt([{type:"input",name:r,...o}]))[r]}async function J(e,t,r){let s=`checkbox-${Date.now()}`,{required:o,min:i,max:n,...p}=E(e,r),c=o??!0,d=p.validate;return(c||i||n)&&(p.validate=a=>c&&a.length===0?"Please select at least one option":i&&a.length<i?`Please select at least ${i} options`:n&&a.length>n?`Please select at most ${n} options`:d?d(a):!0),(await $.prompt([{type:"checkbox",name:s,choices:t,pageSize:Math.min(t.length,10),...p}]))[s]}async function h(e,t,r){let s=`list-${Date.now()}`,o=E(e,r);return(await $.prompt([{type:"list",name:s,choices:t,pageSize:Math.min(t.length,10),...o}]))[s]}var T={cwd:"."};async function P(e,t){let{trim:r,...s}=Object.assign({stdio:"pipe",shell:!0,cwd:T.cwd},t);s.cwd??=T.cwd,Array.isArray(e)&&(e=e.join(" "));let o=i=>{T.verbose?y.debug(i):y.write(i)};o(`$ ${e}`);try{let n=(await ue(s)`${e}`).stdout;return o(n),r?n.trim().replace(/\n|\r/g,""):n.trim()}catch(i){let n=i.stderr||i.message;throw o(n),new Error(n)}}function R(){let e=process.env.npm_config_user_agent;return e?e.split(" ")[0].split("/")[0]:void 0}import Y from"os";import H from"path";import{mkdirSync as me,readJsonSync as ge,writeJsonSync as fe}from"@tomjs/node";import B from"chalk";import de from"inquirer";var K={repo:"https://github.com",owner:Y.userInfo().username};function D(e){let{repo:t,owner:r}=e;return`${t}${t.endsWith("/")?"":"/"}${r}`}async function W(e){let t=await de.prompt([{type:"text",name:"repo",message:`${e?.repo?"Edit":"Add"} git repository url:`,default:e?.repo||K.repo},{type:"text",name:"owner",message:`${e?.owner?"Edit":"Add "} git repository owner:`,default:e?.owner||K.owner}]);return{id:e?.id||Date.now().toString(),repo:t.repo,owner:t.owner}}var X=H.join(Y.homedir(),".tomjs","create-app"),Z=H.join(X,"config.json");function ee(){return me(X),Object.assign({gitRepos:[]},ge(Z))}function ye(e){let t=ee();t.createTime?t.updateTime=Date.now():t.createTime=Date.now(),fe(Z,Object.assign(t,e))}function N(e){ye({gitRepos:e})}async function A(e){let t=e.map(n=>({name:D(n),value:n.id})).concat([{name:"Add",value:"add"},{name:B.red("Exit"),value:"exit"}]),r=await h(e.length===0?"You choose to add or exit:":"You can choose the repository to be operated, or choose to add or exit:",t);if(r==="exit")return;if(r==="add"){let n=await W();return e.push(n),N(e),A(e)}let s=e.findIndex(n=>n.id===r),o=await h("Select an action?",[{name:"Edit",value:"edit"},{name:"Remove",value:"remove"},{name:"Exit",value:"exit"}]);if(o==="exit")return F();if(o==="remove")return await v("Where confirm to remove?",!0)&&(e.splice(s,1),N(e)),A(e);let i=await W(e[s]);return e[s]=i,N(e),A(e)}async function F(){let e=ee(),{gitRepos:t}=e;return t.length===0&&(console.log(`You need to set the ${B.blue("git remote repository")} for the first time.`),await A(t)),e}var x={},je=f.join(he(import.meta.url),"../../"),se=f.join(je,"templates"),$e=oe(f.join(se,"config.json"))||{},S=$e.list||[],Q=S.map(e=>e.variants?e.variants.map(t=>({parent:e,...t})):[e]).flat(),Ee=S.map(e=>e.variants&&e.variants.map(t=>t.name)||[e.name]).reduce((e,t)=>e.concat(t),[]);async function te(e){return P(`git config --get ${e}`,{trim:!0})}var ne=e=>/^(@[a-z0-9]+(-[a-z0-9]+)*\/[a-z0-9._-]+|[a-z0-9._-]+)$/.test(e),Pe=e=>/^[a-z0-9._-]+$/.test(e),Ae=e=>e.includes("/")?e.substring(e.indexOf("/")+1):e;function O(e){return oe(f.join(e,"package.json"))}function V(e,t){ve(f.join(e,"package.json"),t)}function re(e,t,r){let s={},o=Object.keys(e).sort(),i=t||[];i.length>0&&(i=i.filter(p=>o.includes(p)));let n=r||[];return n.length>0&&(n=n.filter(p=>o.includes(p))),i.concat(o.filter(p=>!i.includes(p)&&!n.includes(p))).concat(n).forEach(p=>{s[p]=e[p]}),s}async function ae(e){Object.assign(x,e),x.type==="project"?await Se():await ie(x.type)}async function Se(){let e="project",t=await ce(e,x.cwd),{projectDir:r,variant:s,textVars:o}=t;G(r),_(e,r,s),await q(r,o);let{workspaces:i}=s,n=f.join(r,"packages");i&&await v("Do you want to create an package?")&&await ie("package",n);let{examples:p}=s,c=Array.isArray(p)&&p.length>0;if(c){let g=Q.filter(a=>p.includes(a.name));for(let a of g){let u=f.join(r,"examples",a.name);_("example",u,s),await q(u,o)}}let d=w.existsSync(n)&&w.readdirSync(f.join(r,"packages")).length>0;if(d||c){let g=O(r),a=R()||"npm",u=[];if(d&&u.push("packages"),c&&u.push("examples"),a==="pnpm"){let l=f.join(r,"pnpm-workspace.yaml");w.existsSync(l)||L(l,`packages:
|
|
2
|
+
${u.map(k=>` - "${k}"
|
|
3
|
+
`)}`)}else g.workspaces??=u.map(l=>`"${l}/*"`),V(r,g);"vitest"in(g.devDependencies??{})&&L(f.join(r,"vitest.config.ts"),`export default [${u.map(l=>`"${l}/*"`).join(", ")}];`)}await Ce(t)}async function ie(e,t){let r=!0,s=0;for(;r;){s++;let o=await ce(e,t||x.cwd,s===1?x.template:void 0),{pkgName:i,projectDir:n,variant:p,textVars:c}=o;G(n),_(e,n,p),await q(n,c),y.success(`${b.green(i)} created successfully!`),r=await v("Do you want to create another example?")}}function _(e,t,r){let s=f.join(t,".temp");G(s);let o=r.templates||[];(e!=="project"?o:["config",...o]).forEach((n,p)=>{let c=f.join(se,n);if(!w.existsSync(c))return;xe(c,t);let d=O(s)||{},g=Oe(d,O(t));if(p===o.length){let a=O(t);Object.keys(a).forEach(m=>{g[m]&&(a[m]=g[m])}),Object.keys(g).forEach(m=>{a[m]||(a[m]=g[m])}),["scripts","dependencies","devDependencies","peerDependencies"].forEach(m=>{a[m]&&(m==="scripts"?a[m]=re(a[m],["dev","debug","build","preview","test"],["prepare"]):a[m]=re(a[m]))}),e==="example"&&(delete a.types,delete a.exports,delete a.publishConfig,delete a.repository,delete a.module,delete a.license,a.private=!0),V(t,a),M(s)}else V(s,g)})}async function q(e,t){w.readdirSync(e).filter(o=>o.startsWith("_")).forEach(o=>{w.renameSync(f.join(e,o),f.join(e,o.replace("_",".")))});let r=O(e),s=["LICENSE","README.md","README.zh_CN.md"];r.publishConfig||s.forEach(o=>{M(f.join(e,o))}),["package.json",...s].forEach(o=>{let i=f.join(e,o);if(!w.existsSync(i))return;let n=ke(i);Object.keys(t).forEach(p=>{n=n.replace(new RegExp("{{"+p+"}}","g"),t[p])}),L(i,n)})}async function ce(e,t,r){let{gitRepos:s}=await F(),o=(x.name||"").trim(),i=ne(o);(!o||!i)&&(o=await I("Package name:",{validate:a=>ne(a)?!0:"Please input a valid name!"}));let n=Ae(o);n!==o&&(n=await I("Project name:",{default:n,validate:a=>Pe(a)?!0:"Please input a valid name!"})),y.debug("projectName:",n);let p=f.join(t,n);w.existsSync(p)&&await v("Project already exists, overwrite?")&&M(p),y.debug("projectDir:",p);let c;if(r&&Ee.includes(r)&&(c=Q.find(a=>a.name===r)),!c){let a=await h(!c&&r?`${b.red(r)} is invalid, please select a framework again:`:"Select a framework:",S.filter(l=>!l.variants||!l.variants.length?!1:e==="package"?l.variants.filter(k=>!k.packages?.ignore).length>0:!0).map(l=>({name:l.display,value:l.name})));y.debug("framework:",a);let u=S.find(l=>l.name===a)?.variants||[],m=await h("Select a variant:",e==="package"?u.filter(l=>!l.packages?.ignore).map(l=>{let k=l.parent;return k?{name:`${k.display} > ${l.display}`,value:l.name}:{name:l.display,value:l.name}}):u.map(l=>({name:l.display,value:l.name})));y.debug("variant:",m),c=u.find(l=>l.name===m)}if(!c)throw new Error("variant not found");c.templates||(c.templates=[]),c.templates=[...c.templates,c.name],y.debug("variant:",c),e==="project"&&Array.isArray(c.examples)&&(c.examples=await J("Select examples:",c.examples.map(a=>{let u=Q.find(m=>m.name===a);if(!u)throw new Error(`Can't find example ${b.yellow(a)} from ${b.blue(c.name)}`);return{name:u.display,value:u.name,checked:!0}}),{required:!1}));let d="";e!=="example"&&(d=await h("Which git repository to publish to?",s.map(a=>{let u=D(a);return{name:u,value:u}}).concat([{name:b.yellow("None"),value:""}])));let g={pkgName:o,projectDir:p,variant:c,gitUserUrl:d};return g.textVars=await Te(g),g}async function Te(e){let{pkgName:t,gitUserUrl:r,variant:s}=e,o=await te("user.name"),i=await te("user.email"),n={name:o||we.userInfo().username,email:i||""},p=["pnpm","yarn","npm"].map(u=>`# ${u}
|
|
4
|
+
${u} add ${t}${s.devDependencies?" -D":""}`).join(`
|
|
5
|
+
|
|
6
|
+
`),c={pkgName:t,pkgInstall:p,gitUserName:n.name,gitUserEmail:n.email,gitOrg:g(),gitUrl:d(),gitFullUrl:a(),gitFullSSHUrl:a(),dateYear:new Date().getFullYear()};function d(){return`${r||`https://github.com/${g()}`}/${t.substring(t.indexOf("/")+1)}`}function g(){return r?r.substring(r.lastIndexOf("/")+1):t.startsWith("@")?t.split("/")[0].substring(1):be(n.name)}function a(u=!1){let m=r||`https://github.com/${g()}`;return u&&(m=m.replace(/http(s):\/\//g,"git@").replace(/\//,":")),`${m}/${t.substring(t.indexOf("/")+1)}.git`}return c}async function Ce(e){let{gitUserUrl:t,textVars:r,projectDir:s}=e;t&&(await P("git init",{cwd:s}),await P(`git remote add origin ${r.gitFullSSHUrl}`,{cwd:s}));let o=process.cwd(),i=f.relative(o,s);console.log(`
|
|
7
|
+
Done. Now run:
|
|
8
|
+
`),s!==o&&console.log(` cd ${i.includes(" ")?`"${i}"`:i}`);let n=R()||"npm";switch(n){case"yarn":console.log(" yarn"),console.log(" yarn dev");break;default:console.log(` ${n} install`),console.log(` ${n} run dev`);break}}var z=Ue(`
|
|
9
|
+
Usage
|
|
10
|
+
$ create-app [name] [options]
|
|
11
|
+
|
|
12
|
+
name The package name
|
|
13
|
+
|
|
14
|
+
Options
|
|
15
|
+
--cwd The current working directory (default: ".")
|
|
16
|
+
-e, --example Only create examples
|
|
17
|
+
-p, --package Only create packages
|
|
18
|
+
--verbose Display verbose output
|
|
19
|
+
-h, --help Display this message
|
|
20
|
+
-v, --version Display version number
|
|
21
|
+
|
|
22
|
+
Examples
|
|
23
|
+
$ create-app my-project
|
|
24
|
+
$ create-app my-project --template=vue
|
|
25
|
+
`,{importMeta:import.meta,booleanDefault:void 0,helpIndent:0,flags:{cwd:{type:"string"},verbose:{type:"boolean",default:process.env.NODE_ENV==="development"},example:{shortFlag:"e",type:"boolean",default:!1},package:{shortFlag:"p",type:"boolean",default:!1},h:{type:"boolean",default:!1},v:{type:"boolean",default:!1}}}),{input:pe,flags:j}=z;if(j.h)z.showHelp(0);else if(j.v)z.showVersion();else{y.enableDebug(j.verbose),y.debug("cli options:",pe,j);let e=Object.assign({name:pe[0],type:"project"},j);e.cwd||=process.env.CA_CWD||process.cwd(),y.debug("final options:",e),e.type=Ie(e),await ae(e)}function Ie(e){return e.example?"example":e.package?"package":"project"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomjs/create-app",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.0-alpha.0",
|
|
4
5
|
"description": "create tomjs web app",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"tomjs",
|
|
@@ -23,13 +24,12 @@
|
|
|
23
24
|
"email": "tom@tomgao.cc"
|
|
24
25
|
},
|
|
25
26
|
"license": "MIT",
|
|
26
|
-
"main": "dist/index.mjs",
|
|
27
27
|
"bin": {
|
|
28
|
-
"create-app": "dist/index.
|
|
28
|
+
"create-app": "dist/index.js"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|
|
32
|
-
"template
|
|
32
|
+
"template/**"
|
|
33
33
|
],
|
|
34
34
|
"engines": {
|
|
35
35
|
"node": ">=18"
|
|
@@ -43,42 +43,46 @@
|
|
|
43
43
|
"registry": "https://registry.npmjs.org"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"
|
|
46
|
+
"@tomjs/logger": "^1.0.0",
|
|
47
|
+
"@tomjs/node": "^2.1.0",
|
|
48
|
+
"chalk": "^5.3.0",
|
|
49
|
+
"dayjs": "^1.11.11",
|
|
50
|
+
"execa": "^9.1.0",
|
|
51
|
+
"inquirer": "^9.2.22",
|
|
47
52
|
"lodash-es": "^4.17.21",
|
|
48
|
-
"
|
|
49
|
-
"prompts": "^2.4.2",
|
|
50
|
-
"shelljs": "^0.8.5"
|
|
53
|
+
"meow": "^13.2.0"
|
|
51
54
|
},
|
|
52
55
|
"devDependencies": {
|
|
53
|
-
"@commitlint/cli": "^19.
|
|
54
|
-
"@tomjs/commitlint": "^3.
|
|
55
|
-
"@tomjs/eslint": "^
|
|
56
|
-
"@tomjs/prettier": "^1.
|
|
57
|
-
"@tomjs/stylelint": "^2.
|
|
58
|
-
"@tomjs/tsconfig": "^1.
|
|
56
|
+
"@commitlint/cli": "^19.3.0",
|
|
57
|
+
"@tomjs/commitlint": "^3.2.0",
|
|
58
|
+
"@tomjs/eslint": "^3.0.1",
|
|
59
|
+
"@tomjs/prettier": "^1.4.1",
|
|
60
|
+
"@tomjs/stylelint": "^2.5.0",
|
|
61
|
+
"@tomjs/tsconfig": "^1.6.0",
|
|
62
|
+
"@types/inquirer": "^9.0.7",
|
|
59
63
|
"@types/lodash-es": "^4.17.12",
|
|
60
|
-
"@types/
|
|
61
|
-
"@types/node": "^18.19.26",
|
|
64
|
+
"@types/node": "^18.19.33",
|
|
62
65
|
"@types/prompts": "^2.4.9",
|
|
63
|
-
"@types/shelljs": "^0.8.15",
|
|
64
66
|
"cross-env": "^7.0.3",
|
|
67
|
+
"dotenv": "^16.4.5",
|
|
65
68
|
"eslint": "^8.57.0",
|
|
66
69
|
"husky": "^9.0.11",
|
|
67
|
-
"lint-staged": "^15.2.
|
|
68
|
-
"np": "^9.2.0",
|
|
70
|
+
"lint-staged": "^15.2.5",
|
|
69
71
|
"npm-run-all": "^4.1.5",
|
|
70
72
|
"prettier": "^3.2.5",
|
|
71
|
-
"stylelint": "^16.
|
|
73
|
+
"stylelint": "^16.5.0",
|
|
72
74
|
"tsup": "^8.0.2",
|
|
73
|
-
"
|
|
75
|
+
"tsx": "^4.10.5",
|
|
76
|
+
"type-fest": "^4.18.2",
|
|
77
|
+
"typescript": "~5.4.5"
|
|
74
78
|
},
|
|
75
79
|
"scripts": {
|
|
76
80
|
"dev": "tsup --watch",
|
|
77
|
-
"debug": "
|
|
81
|
+
"debug": "tsx -r dotenv/config src/index.ts",
|
|
78
82
|
"build": "tsup --minify",
|
|
79
83
|
"lint": "run-s lint:eslint lint:stylelint lint:prettier",
|
|
80
|
-
"lint:eslint": "eslint \"{src,
|
|
81
|
-
"lint:stylelint": "stylelint \"
|
|
82
|
-
"lint:prettier": "prettier --write
|
|
84
|
+
"lint:eslint": "eslint \"{src,templates}/**/*.{js,cjs,ts,tsx,vue}\" *.{js,cjs,ts} --fix --cache",
|
|
85
|
+
"lint:stylelint": "stylelint \"templates/**/*.{css,scss,less,vue,html}\" --fix --cache",
|
|
86
|
+
"lint:prettier": "prettier --write ."
|
|
83
87
|
}
|
|
84
88
|
}
|
package/dist/index.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import u,{renameSync as Ye}from"fs";import Be from"os";import l from"path";import{fileURLToPath as He}from"url";import{lightBlue as T,lightCyan as Ke,lightGreen as U,lightYellow as Se,red as be,reset as x,yellow as qe}from"kolorist";import{camelCase as Qe}from"lodash-es";import Xe from"minimist";import Ze from"prompts";import _ from"shelljs";import ve from"os";import xe from"path";import{blue as We,red as D,reset as N}from"kolorist";import Me from"minimist";import te from"prompts";import p from"fs";import K from"path";function $(e){return[["t","template"],["g","git"]].forEach(([i,o])=>{e[o]=e[o]??e[i]}),e}function ue(e){return p.readdirSync(e).length===0}function q(e){return e?.trim().replace(/\/+$/g,"")}function Je(e,i){p.mkdirSync(i,{recursive:!0});for(let o of p.readdirSync(e)){let h=K.resolve(e,o),s=K.resolve(i,o);Q(h,s)}}function Q(e,i){p.statSync(e).isDirectory()?Je(e,i):p.copyFileSync(e,i)}function me(e){if(p.existsSync(e))for(let i of p.readdirSync(e))p.rmSync(K.resolve(e,i),{recursive:!0,force:!0})}function X(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function ge(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function de(e){if(!e)return;let o=e.split(" ")[0].split("/");return{name:o[0],version:o[1]}}function A(e){if(p.existsSync(e))try{return JSON.parse(p.readFileSync(e,"utf8"))}catch(i){console.error(i)}}function O(e,i){p.writeFileSync(e,JSON.stringify(i,null,2)+`
|
|
2
|
-
`)}function Z(e){return p.existsSync(e)?p.readFileSync(e,"utf8"):""}function F(e,i){p.writeFileSync(e,i)}function C(e){p.existsSync(e)&&p.rmSync(e,{recursive:!0,force:!0})}function fe(e){p.existsSync(e)||p.mkdirSync(e,{recursive:!0})}var ze=$(Me(process.argv.slice(2),{string:["_"]})),ye={repo:"https://github.com",owner:ve.userInfo().username};function ne(e){let{repo:i,owner:o}=e;return`${i}${i.endsWith("/")?"":"/"}${o}`}async function he(e){let i=await te([{type:"text",name:"repo",message:N("Git repository url:"),initial:e?.repo||ye.repo},{type:"text",name:"owner",message:N("Git repository owner:"),initial:e?.owner||ye.owner}],{onCancel:()=>{throw console.log(D("\u2716")+" Operation cancelled"),new Error}});return{id:e?.id||Date.now().toString(),repo:i.repo,owner:i.owner}}var we=xe.join(ve.homedir(),".tomjs","create-app"),ke=xe.join(we,"config.json");function G(){return fe(we),Object.assign({gitRepos:[]},A(ke))}function Le(e){let i=G();i.createTime?i.updateTime=Date.now():i.createTime=Date.now(),O(ke,Object.assign(i,e))}function ee(e){Le({gitRepos:e})}async function ie(){let{gitRepos:e}=G();(e.length===0||ze.git)&&(e.length===0&&console.log(`You need to set the ${We("git remote repository")} for the first time.`),await i());async function i(){let o=e.map(v=>({title:ne(v),value:v.id})).concat([{title:"Add",value:"add"},{title:D("Exit"),value:"exit"}]),h=await te({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:o},{onCancel:()=>{throw console.log(D("\u2716")+" Operation cancelled"),new Error}}),{repoId:s}=h;if(s==="exit")return;if(s==="add"){let v=await he();return e.push(v),ee(e),i()}let d=e.findIndex(v=>v.id===s),w=await te([{type:"select",name:"action",message:N("Select an action?"),choices:[{title:"Edit",value:"edit"},{title:"Remove",value:"remove"},{title:"Exit",value:"exit"}]},{type:v=>v==="remove"&&"toggle",name:"confirmRemove",message:N("Where confirm to remove?"),initial:!0,active:"Yes",inactive:"No"}],{onCancel:()=>{throw console.log(D("\u2716")+" Operation cancelled"),new Error}}),{action:E,confirmRemove:I}=w;if(E==="exit")return ie();if(E==="remove")return I&&(e.splice(d,1),ee(e)),i();let V=await he(e[d]);return e[d]=V,ee(e),i()}}var re=$(Xe(process.argv.slice(2),{string:["_"]})),oe=process.cwd(),et=["test","vite","examples"],Re=[{name:"node",display:"Node",color:Se,options:[{id:"test",name:"Test"},{id:"publish",name:"Git Repository + NPM Publish",selected:!0},{id:"ssh",name:"Git init by SSH",selected:!0},{id:"tsup",name:"Use tsup build",selected:!0},{id:"vite",name:"Use vite build"},{id:"vite-plugin",name:"Vite Plugin"},{id:"examples",name:"Examples"},{id:"workspace",name:"Workspaces/Monorepo"}]},{name:"web",display:"Web App",color:U,variants:[{name:"vue",display:"Vue",color:U},{name:"react",display:"React",color:T}]},{name:"electron",display:"Electron App",color:T,variants:[{name:"electron-vue",display:"Vue",color:U},{name:"electron-react",display:"React",color:T}]},{name:"vscode",display:"VSCode Extension",color:Ke,options:[{id:"publish",name:"Git Repository"},{id:"ssh",name:"Git init by SSH"}],variants:[{name:"vscode",display:"Base",color:Se},{name:"vscode-vue",display:"Vue",color:U},{name:"vscode-react",display:"React",color:T}]}],je=Re.map(e=>e.variants&&e.variants.map(i=>i.name)||[e.name]).reduce((e,i)=>e.concat(i),[]),se="my-app";function Pe(e){let i=_.exec(`git config --get ${e}`,{silent:!0});if(i.code===0)return i.stdout.trim()}function Ee(e){return e.length>1?e.substring(e.indexOf("/")+1):e}function P(e,...i){$e(e.devDependencies,...i)}function tt(e,...i){$e(e.peerDependencies,...i)}function $e(e,...i){function o(s,d){return s.includes("@")?s.replace("@","").split("/").find(w=>o(w,d)):d===s||s.includes(`-${d}`)||s.includes(`${d}-`)}let h=e||{};Object.keys(h||{}).forEach(s=>{i.find(d=>o(s,d))&&delete h[s]})}async function nt(){let e=q(re._[0]),i=re.template||re.t,o=e||se,h=()=>o==="."?l.basename(l.resolve()):o,s=Ee(o),{gitRepos:d}=G(),w=await Ze([{type:e?null:"text",name:"projectName",message:x("Project name:"),initial:se,onState:t=>{o=q(t.value)||se,s=Ee(o)}},{type:()=>!u.existsSync(s)||ue(s)?null:"toggle",name:"overwrite",message:()=>(s==="."?"Current directory":`Target directory "${s}"`)+" is not empty. Remove existing files and continue?",initial:!1,active:"Yes",inactive:"No"},{type:(t,{overwrite:n})=>{if(n===!1)throw console.log(be("\u2716")+" Operation cancelled"),new Error;return null},name:"overwriteChecker"},{type:()=>X(h())?null:"text",name:"packageName",message:x("Package name:"),initial:()=>ge(h()),validate:t=>X(t)||"Invalid package.json name"},{type:i&&je.includes(i)?null:"select",name:"framework",message:typeof i=="string"&&!je.includes(i)?x(`"${i}" isn't a valid template. Please choose from below: `):x("Select a framework:"),initial:0,choices:Re.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:x("Select a variant:"),choices:t=>t?.variants?.map(n=>{let r=n.color;return{title:r(n.display||n.name),value:n.name}})},{type:(t,n)=>{let{framework:r}=n;return r&&Array.isArray(r.options)&&r.options.length?"multiselect":null},name:"options",message:x("Select optional options:"),instructions:!1,choices:(t,n)=>{let{framework:r}=n;return r?.options?.map(a=>({title:a.name,value:a.id,selected:a.selected||!1}))}},{type:(t,n)=>d.length&&Array.isArray(n.options)&&n.options.includes("publish")?"select":null,name:"gitUserUrl",message:x("Which git repository to publish to?"),choices:d.map(t=>{let n=ne(t);return{title:n,value:n}})}],{onCancel:()=>{throw console.log(be("\u2716")+" Operation cancelled"),new Error}}),{framework:E,overwrite:I,packageName:V,variant:v,gitUserUrl:k}=w,m=w.options||[],c=l.join(oe,s);I?me(c):u.existsSync(c)||u.mkdirSync(c,{recursive:!0}),console.log(`
|
|
3
|
-
Scaffolding project in ${c}...`);let J=v||E?.name||i||"",W=t=>l.join(He(import.meta.url),"../..",`template-${t}`),Ae=W(J),M=J.includes("node");[W("config"),Ae].forEach(t=>{let n=u.readdirSync(t);for(let r of n){let a=r.startsWith("_")?r.replace("_","."):r;(M&&!m.includes("examples")||J==="vscode")&&r.includes("stylelint")||Q(l.join(t,r),l.join(c,a))}});let y=V||h(),z={name:Pe("user.name")||Be.userInfo().username,email:Pe("user.email")||""},L={"pkg.name":y,"user.name":z.name,"user.email":z.email,"git.org":Y(),"git.url":Oe(),"git.fullUrl":ce()};function Oe(){return`${k||`https://github.com/${Y()}`}/${y.substring(y.indexOf("/")+1)}`}function Y(){return k?k.substring(k.lastIndexOf("/")+1):y.startsWith("@")?y.split("/")[0].substring(1):Qe(z.name)}function ce(t=!1){let n=k||`https://github.com/${Y()}`;return t&&(n=n.replace(/http(s):\/\//g,"git@").replace(/\//,":")),`${n}/${y.substring(y.indexOf("/")+1)}.git`}Te(),M&&(Ue(),_e(),Ie(),Ve());let ae=de(process.env.npm_config_user_agent),B=ae?ae.name:"npm";_.which("git")&&(_.exec(`cd ${c} && git init`),m.includes("publish")&&_.exec(`cd ${c} && git remote add origin ${ce(m.includes("ssh"))}`));let H=l.relative(oe,c);switch(console.log(`
|
|
4
|
-
Done. Now run:
|
|
5
|
-
`),c!==oe&&console.log(` cd ${H.includes(" ")?`"${H}"`:H}`),B){case"yarn":console.log(" yarn"),console.log(" yarn dev");break;default:console.log(` ${B} install`),console.log(` ${B} run dev`);break}function S(){return A(l.join(c,"package.json"))}function b(t){O(l.join(c,"package.json"),t)}function Fe(){return Z(l.join(c,"package.json"))}function Ce(t){F(l.join(c,"package.json"),t)}function R(...t){!Array.isArray(t)||t.length===0||t.forEach(n=>{let r=l.join(c,n);u.existsSync(r)&&C(r)})}function De(t,n,r){let a=l.join(c,t),g=Z(a);g=g.replaceAll(n,r),F(a,g)}function Ne(t,n){let r=t.lastIndexOf("."),a=t.substring(0,r)+"."+n+t.substring(r),g=l.join(c,t),f=l.join(c,a);u.existsSync(f)&&(m.includes(n)?(C(g),Ye(f,g)):C(f))}function Ge(...t){t.forEach(n=>{et.forEach(r=>{Ne(n,r)})})}function Te(){let t=S();t.name=y,m.includes("publish")||(delete t.author,delete t.publishConfig,delete t.repository,delete t.scripts.prepublishOnly,delete t.devDependencies.np),y.endsWith("-cli")?(delete t.main,delete t.module,delete t.types,delete t.exports):delete t.bin,M&&(m.includes("vite")?(t.scripts.dev="vite",t.scripts.build="vite build",P(t,"tsup"),R("tsup.config.ts")):(t.scripts.dev="tsup --watch",t.scripts.build="tsup",R("vite.config.ts"),m.includes("vite-plugin")||(P(t,"vite"),De("tsup.config.ts","'vite'",""))),m.includes("vite-plugin")||tt(t,"vite")),b(t);let n=Fe();Object.keys(L).forEach(r=>{n=n.replace(new RegExp("{{"+r+"}}","g"),L[r])}),Ce(n)}function Ue(){Ge(".lintstagedrc.cjs","tsconfig.json");let t=m.find(r=>["vite-plugin"].includes(r))||["cli","plugin"].find(r=>y.includes(`-${r}`)),n=["pnpm","yarn","npm"].map(r=>`# ${r}
|
|
6
|
-
${r} add ${y}${t?" -D":""}`).join(`
|
|
7
|
-
|
|
8
|
-
`);["LICENSE","README.md","README.zh_CN.md"].forEach(r=>{let a=l.join(c,r);if(!m.includes("publish")&&u.existsSync(a)){u.rmSync(a),r==="README.md"&&u.writeFileSync(a,`# ${y}
|
|
9
|
-
`,{encoding:"utf-8"});return}if(!u.existsSync(a))return;let g=Object.assign({},L,{"pkg.install":n}),f=u.readFileSync(a,"utf-8");Object.keys(g).forEach(j=>{f=f.replace(new RegExp("{{"+j+"}}","g"),g[j])}),u.writeFileSync(a,f,"utf8")})}function _e(){let t=S();if(m.includes("test")){m.includes("workspace")||R("vitest.workspace.ts");return}delete t.scripts.test,t.scripts["lint:eslint"]=t.scripts["lint:eslint"].replace(",test",""),P(t,"vitest"),b(t),R("test","vitest.workspace.ts")}function Ie(){if(!m.includes("examples")){let n=S();n.scripts.lint=n.scripts.lint.replace(" lint:stylelint",""),n.scripts["lint:eslint"]=n.scripts["lint:eslint"].replace(",examples",""),delete n.scripts["lint:stylelint"],P(n,"stylelint"),b(n);return}let t=l.join(c,"examples");u.mkdirSync(t),["vue","react"].forEach(n=>{let r=W(n),a=l.join(t,n);if(!u.existsSync(r)){console.log(`${qe(r)} template is not exist`);return}u.cpSync(r,a,{recursive:!0});let g=S();Object.keys(g.scripts).forEach(f=>{(f.startsWith("lint")||["prepare"].includes(f))&&delete g.scripts[f]}),P(g,"eslint","prettier","stylelint","commitlint","husky","lint-staged","tsconfig","lint-staged","npm-run-all"),b(g),["_lintstagedrc.cjs"].forEach(f=>{let j=l.join(a,f);u.existsSync(j)&&u.rmSync(j,{recursive:!0})})})}function Ve(){let t=[];m.includes("examples")&&t.push("examples");let n=S();m.includes("workspace")?(t.push("packages"),delete n.private,delete n.version,delete n.description,delete n.keywords,delete n.license,delete n.main,delete n.module,delete n.types,delete n.exports,delete n.files,delete n.publishConfig,delete n.repository):delete n.private,b(n),t.length&&F(l.join(c,"pnpm-workspace.yaml"),`packages:
|
|
10
|
-
${t.map(r=>` - '${r}/*'`).join(`
|
|
11
|
-
`)}`)}}ie().then(async()=>nt().catch(e=>{e.message&&console.error(e)})).catch(e=>{e.message&&console.error(e)});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# 🎨 editorconfig.org
|
|
2
|
-
|
|
3
|
-
root = true
|
|
4
|
-
|
|
5
|
-
[*]
|
|
6
|
-
charset = utf-8
|
|
7
|
-
end_of_line = lf
|
|
8
|
-
indent_style = space
|
|
9
|
-
indent_size = 2
|
|
10
|
-
trim_trailing_whitespace = true
|
|
11
|
-
insert_final_newline = true
|
|
12
|
-
|
|
13
|
-
[*.md]
|
|
14
|
-
insert_final_newline = false
|
|
15
|
-
trim_trailing_whitespace = false
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
## GITATTRIBUTES FOR WEB PROJECTS
|
|
2
|
-
#
|
|
3
|
-
# These settings are for any web project.
|
|
4
|
-
#
|
|
5
|
-
# Details per file setting:
|
|
6
|
-
# text These files should be normalized (i.e. convert CRLF to LF).
|
|
7
|
-
# binary These files are binary and should be left untouched.
|
|
8
|
-
#
|
|
9
|
-
# Note that binary is a macro for -text -diff.
|
|
10
|
-
######################################################################
|
|
11
|
-
|
|
12
|
-
## AUTO-DETECT
|
|
13
|
-
## Handle line endings automatically for files detected as
|
|
14
|
-
## text and leave all files detected as binary untouched.
|
|
15
|
-
## This will handle all files NOT defined below.
|
|
16
|
-
* text eol=lf
|
|
17
|
-
|
|
18
|
-
## SOURCE CODE
|
|
19
|
-
*.bat text eol=crlf
|
|
20
|
-
*.coffee text
|
|
21
|
-
*.css text
|
|
22
|
-
*.htm text
|
|
23
|
-
*.html text
|
|
24
|
-
*.inc text
|
|
25
|
-
*.ini text
|
|
26
|
-
*.java text
|
|
27
|
-
*.js text
|
|
28
|
-
*.json text
|
|
29
|
-
*.jsx text
|
|
30
|
-
*.less text
|
|
31
|
-
*.od text
|
|
32
|
-
*.onlydata text
|
|
33
|
-
*.php text
|
|
34
|
-
*.pl text
|
|
35
|
-
*.py text
|
|
36
|
-
*.rb text
|
|
37
|
-
*.sass text
|
|
38
|
-
*.scm text
|
|
39
|
-
*.scss text
|
|
40
|
-
*.sh text eol=lf
|
|
41
|
-
*.sql text
|
|
42
|
-
*.styl text
|
|
43
|
-
*.tag text
|
|
44
|
-
*.ts text
|
|
45
|
-
*.tsx text
|
|
46
|
-
*.xml text
|
|
47
|
-
*.xhtml text
|
|
48
|
-
|
|
49
|
-
## DOCKER
|
|
50
|
-
*.dockerignore text
|
|
51
|
-
Dockerfile text
|
|
52
|
-
|
|
53
|
-
## DOCUMENTATION
|
|
54
|
-
*.markdown text
|
|
55
|
-
*.md text
|
|
56
|
-
*.mdwn text
|
|
57
|
-
*.mdown text
|
|
58
|
-
*.mkd text
|
|
59
|
-
*.mkdn text
|
|
60
|
-
*.mdtxt text
|
|
61
|
-
*.mdtext text
|
|
62
|
-
*.txt text
|
|
63
|
-
AUTHORS text
|
|
64
|
-
CHANGELOG text
|
|
65
|
-
CHANGES text
|
|
66
|
-
CONTRIBUTING text
|
|
67
|
-
COPYING text
|
|
68
|
-
copyright text
|
|
69
|
-
*COPYRIGHT* text
|
|
70
|
-
INSTALL text
|
|
71
|
-
license text
|
|
72
|
-
LICENSE text
|
|
73
|
-
NEWS text
|
|
74
|
-
readme text
|
|
75
|
-
*README* text
|
|
76
|
-
|
|
77
|
-
## TEMPLATES
|
|
78
|
-
*.dot text
|
|
79
|
-
*.ejs text
|
|
80
|
-
*.haml text
|
|
81
|
-
*.handlebars text
|
|
82
|
-
*.hbs text
|
|
83
|
-
*.hbt text
|
|
84
|
-
*.jade text
|
|
85
|
-
*.latte text
|
|
86
|
-
*.mustache text
|
|
87
|
-
*.njk text
|
|
88
|
-
*.phtml text
|
|
89
|
-
*.tmpl text
|
|
90
|
-
*.tpl text
|
|
91
|
-
*.twig text
|
|
92
|
-
|
|
93
|
-
## LINTERS
|
|
94
|
-
.csslintrc text
|
|
95
|
-
.eslintrc text
|
|
96
|
-
.jscsrc text
|
|
97
|
-
.jshintrc text
|
|
98
|
-
.jshintignore text
|
|
99
|
-
.stylelintrc text
|
|
100
|
-
|
|
101
|
-
## CONFIGS
|
|
102
|
-
*.bowerrc text
|
|
103
|
-
*.cnf text
|
|
104
|
-
*.conf text
|
|
105
|
-
*.config text
|
|
106
|
-
.browserslistrc text
|
|
107
|
-
.editorconfig text
|
|
108
|
-
.gitattributes text
|
|
109
|
-
.gitconfig text
|
|
110
|
-
.gitignore text
|
|
111
|
-
.htaccess text
|
|
112
|
-
*.npmignore text
|
|
113
|
-
*.yaml text
|
|
114
|
-
*.yml text
|
|
115
|
-
browserslist text
|
|
116
|
-
Makefile text
|
|
117
|
-
makefile text
|
|
118
|
-
|
|
119
|
-
## HEROKU
|
|
120
|
-
Procfile text
|
|
121
|
-
.slugignore text
|
|
122
|
-
|
|
123
|
-
## GRAPHICS
|
|
124
|
-
*.ai binary
|
|
125
|
-
*.bmp binary
|
|
126
|
-
*.eps binary
|
|
127
|
-
*.gif binary
|
|
128
|
-
*.ico binary
|
|
129
|
-
*.jng binary
|
|
130
|
-
*.jp2 binary
|
|
131
|
-
*.jpg binary
|
|
132
|
-
*.jpeg binary
|
|
133
|
-
*.jpx binary
|
|
134
|
-
*.jxr binary
|
|
135
|
-
*.pdf binary
|
|
136
|
-
*.png binary
|
|
137
|
-
*.psb binary
|
|
138
|
-
*.psd binary
|
|
139
|
-
*.svg text
|
|
140
|
-
*.svgz binary
|
|
141
|
-
*.tif binary
|
|
142
|
-
*.tiff binary
|
|
143
|
-
*.wbmp binary
|
|
144
|
-
*.webp binary
|
|
145
|
-
|
|
146
|
-
## AUDIO
|
|
147
|
-
*.kar binary
|
|
148
|
-
*.m4a binary
|
|
149
|
-
*.mid binary
|
|
150
|
-
*.midi binary
|
|
151
|
-
*.mp3 binary
|
|
152
|
-
*.ogg binary
|
|
153
|
-
*.ra binary
|
|
154
|
-
|
|
155
|
-
## VIDEO
|
|
156
|
-
*.3gpp binary
|
|
157
|
-
*.3gp binary
|
|
158
|
-
*.as binary
|
|
159
|
-
*.asf binary
|
|
160
|
-
*.asx binary
|
|
161
|
-
*.fla binary
|
|
162
|
-
*.flv binary
|
|
163
|
-
*.m4v binary
|
|
164
|
-
*.mng binary
|
|
165
|
-
*.mov binary
|
|
166
|
-
*.mp4 binary
|
|
167
|
-
*.mpeg binary
|
|
168
|
-
*.mpg binary
|
|
169
|
-
*.swc binary
|
|
170
|
-
*.swf binary
|
|
171
|
-
*.webm binary
|
|
172
|
-
|
|
173
|
-
## ARCHIVES
|
|
174
|
-
*.7z binary
|
|
175
|
-
*.gz binary
|
|
176
|
-
*.rar binary
|
|
177
|
-
*.tar binary
|
|
178
|
-
*.zip binary
|
|
179
|
-
|
|
180
|
-
## FONTS
|
|
181
|
-
*.ttf binary
|
|
182
|
-
*.eot binary
|
|
183
|
-
*.otf binary
|
|
184
|
-
*.woff binary
|
|
185
|
-
*.woff2 binary
|
|
186
|
-
|
|
187
|
-
## EXECUTABLES
|
|
188
|
-
*.exe binary
|
|
189
|
-
*.pyc binary
|
|
190
|
-
*.jar binary
|
|
191
|
-
*.dll binary
|
|
192
|
-
|
|
193
|
-
## DOCUMENT
|
|
194
|
-
*.doc binary
|
|
195
|
-
*.docx binary
|
|
196
|
-
*.xls binary
|
|
197
|
-
*.xlsx binary
|
|
198
|
-
*.ppt binary
|
|
199
|
-
*.pptx binary
|
|
200
|
-
|
|
201
|
-
## EXTENSIONS
|
|
202
|
-
*.crx binary
|
|
203
|
-
*.xpi binary
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pnpm commitlint --edit $1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pnpm lint-staged
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require.resolve('@tomjs/prettier');
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
bower_components
|
|
21
|
-
jspm_packages
|
|
22
|
-
node_modules
|
|
23
|
-
web_modules
|
|
24
|
-
|
|
25
|
-
# cache
|
|
26
|
-
.cache
|
|
27
|
-
.npm
|
|
28
|
-
.tmp
|
|
29
|
-
.temp
|
|
30
|
-
.eslintcache
|
|
31
|
-
.stylelintcache
|
|
32
|
-
tsconfig.tsbuildinfo
|
|
33
|
-
|
|
34
|
-
# environment
|
|
35
|
-
*.local
|
|
36
|
-
|
|
37
|
-
# macOS
|
|
38
|
-
.DS_Store
|
|
39
|
-
|
|
40
|
-
# package files
|
|
41
|
-
*.7z
|
|
42
|
-
*.gz
|
|
43
|
-
*.gzip
|
|
44
|
-
*.rar
|
|
45
|
-
*.tar
|
|
46
|
-
*.tar.*
|
|
47
|
-
*.tgz
|
|
48
|
-
*.zip
|
|
49
|
-
*.vsix
|
|
50
|
-
|
|
51
|
-
# IDEA
|
|
52
|
-
.idea
|
|
53
|
-
|
|
54
|
-
# vscode
|
|
55
|
-
.history
|
|
56
|
-
|
|
57
|
-
# build output
|
|
58
|
-
build
|
|
59
|
-
dist
|
|
60
|
-
release
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"name": "Debug Main Process",
|
|
9
|
-
"type": "node",
|
|
10
|
-
"request": "launch",
|
|
11
|
-
"cwd": "${workspaceFolder}",
|
|
12
|
-
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
|
|
13
|
-
"windows": {
|
|
14
|
-
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
|
|
15
|
-
},
|
|
16
|
-
"args": [
|
|
17
|
-
".",
|
|
18
|
-
],
|
|
19
|
-
"outFiles": [
|
|
20
|
-
"${workspaceFolder}/**/*.js",
|
|
21
|
-
"${workspaceFolder}/**/*.cjs",
|
|
22
|
-
"${workspaceFolder}/**/*.mjs",
|
|
23
|
-
"!**/node_modules/**"
|
|
24
|
-
],
|
|
25
|
-
"preLaunchTask": "${defaultBuildTask}",
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
-
// for the documentation about the tasks.json format
|
|
4
|
-
"version": "2.0.0",
|
|
5
|
-
"tasks": [
|
|
6
|
-
{
|
|
7
|
-
"type": "npm",
|
|
8
|
-
"script": "dev",
|
|
9
|
-
"detail": "cross-env VITE_ELECTRON_DEBUG=1 vite",
|
|
10
|
-
"problemMatcher": {
|
|
11
|
-
"owner": "typescript",
|
|
12
|
-
"fileLocation": "relative",
|
|
13
|
-
"pattern": {
|
|
14
|
-
"regexp": "^([a-zA-Z]\\:\/?([\\w\\-]\/?)+\\.\\w+):(\\d+):(\\d+): (ERROR|WARNING)\\: (.*)$",
|
|
15
|
-
"file": 1,
|
|
16
|
-
"line": 3,
|
|
17
|
-
"column": 4,
|
|
18
|
-
"code": 5,
|
|
19
|
-
"message": 6
|
|
20
|
-
},
|
|
21
|
-
"background": {
|
|
22
|
-
"activeOnStart": true,
|
|
23
|
-
"beginsPattern": "^.*VITE v.* ready in \\d* ms.*$",
|
|
24
|
-
"endsPattern": "^.*\\[tomjs:electron\\] startup electron*$"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"isBackground": true,
|
|
28
|
-
"presentation": {
|
|
29
|
-
"reveal": "never"
|
|
30
|
-
},
|
|
31
|
-
"group": {
|
|
32
|
-
"kind": "build",
|
|
33
|
-
"isDefault": true
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|