@lntvow/dev 4.2.1 → 4.2.3

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/README.md CHANGED
@@ -1 +1,3 @@
1
- # 开发环境依赖包
1
+ # @lntvow/dev
2
+
3
+ 开发环境依赖包
package/dist/cli.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var j=Object.create;var u=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var I=(t,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of U(o))!F.call(t,i)&&i!==e&&u(t,i,{get:()=>o[i],enumerable:!(n=_(o,i))||n.enumerable});return t};var p=(t,o,e)=>(e=t!=null?j(z(t)):{},I(o||!t||!t.__esModule?u(e,"default",{value:t,enumerable:!0}):e,t));var R=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href,d=R();var b=require("child_process"),m=require("fs"),k=require("path"),a=require("commander"),r=p(require("picocolors"),1);var y="@lntvow/dev",v="4.2.1";var c=p(require("fs"),1),l=p(require("path"),1),h=require("url"),g=p(require("picocolors"),1),T=(0,h.fileURLToPath)(d),D=l.default.dirname(T),[S]=process.cwd().split("node_modules");console.log("cwd: ",S);function x(t,o){c.default.existsSync(o)||c.default.mkdirSync(o),c.default.readdirSync(t,{withFileTypes:!0}).forEach(n=>{let i=l.default.resolve(t,n.name),s=l.default.resolve(o,n.name);if(n.isDirectory())x(i,s);else{if(c.default.existsSync(s))return;c.default.copyFileSync(i,s)}})}function w(){console.log(g.default.blue("Start copying template files")),x(l.default.resolve(D,"./configs"),S),console.log(g.default.green("Template files copied successfully"))}a.program.name(y).version(v,"-v, --version","output the version number");a.program.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(t=>{console.log(r.default.green("Init project by @lntvow/dev"));let{temp:o,git:e,scripts:n}=t;if(o&&w(),e){console.log(r.default.blue("Start init simple-git-hooks"));let i=(0,b.execSync)("npx simple-git-hooks");console.log(i.toString())}if(n){console.log(r.default.blue("Start init scripts"));try{let i=(0,k.resolve)(process.cwd(),"package.json"),s=JSON.parse((0,m.readFileSync)(i,"utf-8"));s={...s,scripts:{...s.scripts,postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"}},(0,m.writeFileSync)(i,JSON.stringify(s,null,2)),console.log(r.default.green("Scripts added successfully"))}catch{console.log(r.default.yellow("No package.json file found ignoring scripts"))}}console.log(r.default.yellow(`
2
+ "use strict";var j=Object.create;var u=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var I=(t,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of U(o))!F.call(t,i)&&i!==e&&u(t,i,{get:()=>o[i],enumerable:!(n=_(o,i))||n.enumerable});return t};var p=(t,o,e)=>(e=t!=null?j(z(t)):{},I(o||!t||!t.__esModule?u(e,"default",{value:t,enumerable:!0}):e,t));var R=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href,d=R();var b=require("child_process"),m=require("fs"),k=require("path"),a=require("commander"),r=p(require("picocolors"),1);var y="@lntvow/dev",v="4.2.3";var c=p(require("fs"),1),l=p(require("path"),1),h=require("url"),g=p(require("picocolors"),1),T=(0,h.fileURLToPath)(d),D=l.default.dirname(T),[S]=process.cwd().split("node_modules");console.log("cwd: ",S);function x(t,o){c.default.existsSync(o)||c.default.mkdirSync(o),c.default.readdirSync(t,{withFileTypes:!0}).forEach(n=>{let i=l.default.resolve(t,n.name),s=l.default.resolve(o,n.name);if(n.isDirectory())x(i,s);else{if(c.default.existsSync(s))return;c.default.copyFileSync(i,s)}})}function w(){console.log(g.default.blue("Start copying template files")),x(l.default.resolve(D,"./configs"),S),console.log(g.default.green("Template files copied successfully"))}a.program.name(y).version(v,"-v, --version","output the version number");a.program.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(t=>{console.log(r.default.green("Init project by @lntvow/dev"));let{temp:o,git:e,scripts:n}=t;if(o&&w(),e){console.log(r.default.blue("Start init simple-git-hooks"));let i=(0,b.execSync)("npx simple-git-hooks");console.log(i.toString())}if(n){console.log(r.default.blue("Start init scripts"));try{let i=(0,k.resolve)(process.cwd(),"package.json"),s=JSON.parse((0,m.readFileSync)(i,"utf-8"));s={...s,scripts:{...s.scripts,postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"}},(0,m.writeFileSync)(i,JSON.stringify(s,null,2)),console.log(r.default.green("Scripts added successfully"))}catch{console.log(r.default.yellow("No package.json file found ignoring scripts"))}}console.log(r.default.yellow(`
3
3
  You may need to re-execute the "pnpm install" command`))});a.program.parse();
package/dist/cli.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{execSync as S}from"child_process";import{readFileSync as w,writeFileSync as b}from"fs";import{resolve as k}from"path";import{program as r}from"commander";import o from"picocolors";var a="@lntvow/dev",d="4.2.1";import n from"node:fs";import c from"node:path";import{fileURLToPath as v}from"node:url";import g from"picocolors";var h=v(import.meta.url),x=c.dirname(h),[f]=process.cwd().split("node_modules");console.log("cwd: ",f);function u(l,e){n.existsSync(e)||n.mkdirSync(e),n.readdirSync(l,{withFileTypes:!0}).forEach(s=>{let i=c.resolve(l,s.name),t=c.resolve(e,s.name);if(s.isDirectory())u(i,t);else{if(n.existsSync(t))return;n.copyFileSync(i,t)}})}function y(){console.log(g.blue("Start copying template files")),u(c.resolve(x,"./configs"),f),console.log(g.green("Template files copied successfully"))}r.name(a).version(d,"-v, --version","output the version number");r.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(l=>{console.log(o.green("Init project by @lntvow/dev"));let{temp:e,git:p,scripts:s}=l;if(e&&y(),p){console.log(o.blue("Start init simple-git-hooks"));let i=S("npx simple-git-hooks");console.log(i.toString())}if(s){console.log(o.blue("Start init scripts"));try{let i=k(process.cwd(),"package.json"),t=JSON.parse(w(i,"utf-8"));t={...t,scripts:{...t.scripts,postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"}},b(i,JSON.stringify(t,null,2)),console.log(o.green("Scripts added successfully"))}catch{console.log(o.yellow("No package.json file found ignoring scripts"))}}console.log(o.yellow(`
2
+ import{execSync as S}from"child_process";import{readFileSync as w,writeFileSync as b}from"fs";import{resolve as k}from"path";import{program as r}from"commander";import o from"picocolors";var a="@lntvow/dev",d="4.2.3";import n from"node:fs";import c from"node:path";import{fileURLToPath as v}from"node:url";import g from"picocolors";var h=v(import.meta.url),x=c.dirname(h),[f]=process.cwd().split("node_modules");console.log("cwd: ",f);function u(l,e){n.existsSync(e)||n.mkdirSync(e),n.readdirSync(l,{withFileTypes:!0}).forEach(s=>{let i=c.resolve(l,s.name),t=c.resolve(e,s.name);if(s.isDirectory())u(i,t);else{if(n.existsSync(t))return;n.copyFileSync(i,t)}})}function y(){console.log(g.blue("Start copying template files")),u(c.resolve(x,"./configs"),f),console.log(g.green("Template files copied successfully"))}r.name(a).version(d,"-v, --version","output the version number");r.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(l=>{console.log(o.green("Init project by @lntvow/dev"));let{temp:e,git:p,scripts:s}=l;if(e&&y(),p){console.log(o.blue("Start init simple-git-hooks"));let i=S("npx simple-git-hooks");console.log(i.toString())}if(s){console.log(o.blue("Start init scripts"));try{let i=k(process.cwd(),"package.json"),t=JSON.parse(w(i,"utf-8"));t={...t,scripts:{...t.scripts,postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"}},b(i,JSON.stringify(t,null,2)),console.log(o.green("Scripts added successfully"))}catch{console.log(o.yellow("No package.json file found ignoring scripts"))}}console.log(o.yellow(`
3
3
  You may need to re-execute the "pnpm install" command`))});r.parse();
@@ -0,0 +1,60 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ # Runtime data
11
+ pids
12
+ *.pid
13
+ *.seed
14
+ *.pid.lock
15
+
16
+
17
+ # Temporary and cache folders
18
+ tmp
19
+ temp
20
+ .temp
21
+ .cache
22
+ .npm
23
+ .eslintcache
24
+ .stylelintcache
25
+
26
+ # OS-generated files
27
+ .DS_Store
28
+ .AppleDouble
29
+ .LSOverride
30
+
31
+ # Coverage reports (generated by testing tools)
32
+ coverage
33
+ *.lcov
34
+ .nyc_output
35
+
36
+
37
+ # Editor directories and files
38
+ .idea
39
+ *.suo
40
+ *.ntvs*
41
+ *.njsproj
42
+ *.sln
43
+ *.sw?
44
+
45
+ # Build output directories
46
+ dist
47
+ build
48
+ out
49
+
50
+ # Dependency directories
51
+ node_modules
52
+ jspm_packages
53
+
54
+
55
+ # Local files
56
+ *.local
57
+
58
+ # Custom
59
+ src/typings/auto-imports.d.ts
60
+ src/typings/components.d.ts
@@ -0,0 +1,5 @@
1
+ shamefully-hoist=true
2
+ auto-install-peers=true
3
+
4
+ registry=https://registry.npmmirror.com
5
+ # registry=https://registry.npmjs.org
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/dev",
3
- "version": "4.2.1",
3
+ "version": "4.2.3",
4
4
  "type": "module",
5
5
  "description": "开发环境依赖包",
6
6
  "keywords": [
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "files": [
15
15
  "dist",
16
- "dist/configs"
16
+ "dist/configs/*"
17
17
  ],
18
18
  "bin": {
19
19
  "lntvow": "./dist/cli.mjs"