@epxing/cli 0.5.0-beta.6 → 0.5.0-beta.8

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.
@@ -1,4 +1,18 @@
1
- import{a as r}from"./OVN5O3EZ.mjs";function c(i="5.3.0-beta.2"){let s=i.match(/^[~^]?(\d+)\.(\d+)\.(\d+)(?:-([\w.-]+))?$/);if(!s)return!1;let[,p,t,e,n]=s,o=Number(p)*1e6+Number(t)*1e3+Number(e);return o!==5003e3?o>5003e3:!n||/^beta\.(\d+)$/.test(n)&&Number(n.slice(5))>=2}r(c,"usesAutomaticStyles");var m=["@epxing/core/style.css","@epxing/components/style.css","@epxing/business/style.css"],a={main:`import { createApp } from '@epxing/core'
1
+ import{a as o}from"./J7B2EWKH.mjs";var a=`import { createRequire } from 'node:module'
2
+ import path from 'node:path'
3
+ import { spawnSync } from 'node:child_process'
4
+
5
+ const require = createRequire(import.meta.url)
6
+ const args = process.argv.slice(2)
7
+ const full = args.includes('--full') || process.env.npm_config_full === 'true'
8
+ const lazy = full ? 'false' : (process.env.LAZY_LIB || 'true')
9
+ const vite = path.join(path.dirname(require.resolve('vite/package.json')), 'bin/vite.js')
10
+ const result = spawnSync(process.execPath, [vite, 'build', ...args.filter(arg => arg !== '--full')], {
11
+ stdio: 'inherit', env: { ...process.env, LAZY_LIB: lazy }
12
+ })
13
+ if (result.error) throw result.error
14
+ process.exit(result.status ?? 1)
15
+ `;function c(n="5.3.0-beta.2"){let i=n.match(/^[~^]?(\d+)\.(\d+)\.(\d+)(?:-([\w.-]+))?$/);if(!i)return!1;let[,r,t,e,s]=i,p=Number(r)*1e6+Number(t)*1e3+Number(e);return p!==5003e3?p>5003e3:!s||/^beta\.(\d+)$/.test(s)&&Number(s.slice(5))>=2}o(c,"usesAutomaticStyles");var l=["@epxing/core/style.css","@epxing/components/style.css","@epxing/business/style.css"],m={main:`import { createApp } from '@epxing/core'
2
16
  import Components from '@epxing/components'
3
17
  import Business from '@epxing/business'
4
18
  import '@epxing/theme'
@@ -26,10 +40,10 @@ const count = ref(0)
26
40
  <style scoped>
27
41
  .product-start { padding: var(--epx-space-4, 24px); color: var(--epx-text); }
28
42
  </style>
29
- `};function u(i,s,p){let t=r(n=>(n||"").replaceAll(`\r
43
+ `};function g(n,i,r){let t=o(s=>(s||"").replaceAll(`\r
30
44
  `,`
31
- `).trim(),"normalize"),e=t(i);for(let n of m)e=e.replace(`import '${n}'
32
- `,"");return e===t(a.main)&&t(s)===t(a.app.replaceAll("__NAME__",p))}r(u,"isLegacyWelcomeProduct");function d(i,s){let p={...i,"package.json":JSON.stringify({name:"__NAME__",version:"0.1.0",private:!0,runtime:"vue3",type:"module",scripts:{dev:"vite","build:lib":"vite build","build:lib:lazy":"cross-env LAZY_LIB=true vite build","build:app":"vite build --mode app",preview:"vite preview"},dependencies:{"@epxing/core":"__PACKAGES_VERSION__","@epxing/components":"__PACKAGES_VERSION__","@epxing/utils":"__PACKAGES_VERSION__","@epxing/business":"__PACKAGES_VERSION__","@epxing/theme":"__PACKAGES_VERSION__",vue:"3.5.39","vue-router":"4.6.4",vuex:"4.1.0","element-plus":"2.14.3"},devDependencies:{"@epxing/cli":"__CLI_VERSION__","@epxing/icons":"__PACKAGES_VERSION__",vite:"^6.0.0","@vitejs/plugin-vue":"^5.2.1","@vitejs/plugin-vue-jsx":"^4.1.1",sass:"^1.83.3","cross-env":"^7.0.3"}},null,2)+`
45
+ `).trim(),"normalize"),e=t(n);for(let s of l)e=e.replace(`import '${s}'
46
+ `,"");return e===t(m.main)&&t(i)===t(m.app.replaceAll("__NAME__",r))}o(g,"isLegacyWelcomeProduct");function x(n,i){let r={...n,"build-lib.mjs":a,"package.json":JSON.stringify({name:"__NAME__",version:"0.1.0",private:!0,runtime:"vue3",type:"module",scripts:{dev:"vite","build:lib":"node build-lib.mjs","build:lib:full":"node build-lib.mjs --full","build:lib:lazy":"cross-env LAZY_LIB=true vite build","build:app":"vite build --mode app",preview:"vite preview"},dependencies:{"@epxing/core":"__PACKAGES_VERSION__","@epxing/components":"__PACKAGES_VERSION__","@epxing/utils":"__PACKAGES_VERSION__","@epxing/business":"__PACKAGES_VERSION__","@epxing/theme":"__PACKAGES_VERSION__",vue:"3.5.39","vue-router":"4.6.4",vuex:"4.1.0","element-plus":"2.14.3"},devDependencies:{"@epxing/cli":"__CLI_VERSION__","@epxing/icons":"__PACKAGES_VERSION__",vite:"^6.0.0","@vitejs/plugin-vue":"^5.2.1","@vitejs/plugin-vue-jsx":"^4.1.1",sass:"^1.83.3","cross-env":"^7.0.3"}},null,2)+`
33
47
  `,"vite.config.mjs":`import path from 'node:path'
34
48
  import { fileURLToPath } from 'node:url'
35
49
  import { createRequire } from 'node:module'
@@ -121,9 +135,9 @@ npm run build:app
121
135
  \`\`\`
122
136
 
123
137
  \u672C\u5730\u9884\u89C8\u9ED8\u8BA4\u7AEF\u53E3 8080\uFF0C\u9ED8\u8BA4\u6253\u5F00\u5E73\u53F0\u7CFB\u7EDF\u3002\u542F\u52A8\u524D\u5728 .env.development.local \u914D\u7F6E\u540E\u7AEF\u53CA\u5BA2\u6237\u7AEF\u3001\u7CFB\u7EDF\u3001\u5E94\u7528\u53C2\u6570\uFF1B\u767B\u5F55\u3001\u83DC\u5355\u548C\u9996\u9875\u4F7F\u7528\u5E73\u53F0\u914D\u7F6E\u3002
124
- `,"PRODUCT-GUIDE.md":l};if(!c(s)){let t=m.map(e=>`import '${e}'`).join(`
125
- `);for(let e of["src/main.js","PRODUCT-GUIDE.md"])p[e]=p[e].replace("import '@epxing/theme'",`import '@epxing/theme'
126
- `+t)}return p}r(d,"createPackageTemplates");var l=`# \u4EA7\u54C1\u5F00\u53D1\u4E0E\u5347\u7EA7\u4F7F\u7528\u8BF4\u660E
138
+ `,"PRODUCT-GUIDE.md":u};if(!c(i)){let t=l.map(e=>`import '${e}'`).join(`
139
+ `);for(let e of["src/main.js","PRODUCT-GUIDE.md"])r[e]=r[e].replace("import '@epxing/theme'",`import '@epxing/theme'
140
+ `+t)}return r}o(x,"createPackageTemplates");var u=`# \u4EA7\u54C1\u5F00\u53D1\u4E0E\u5347\u7EA7\u4F7F\u7528\u8BF4\u660E
127
141
 
128
142
  <!-- epxing-generated-product-guide -->
129
143
 
@@ -199,7 +213,8 @@ export default {
199
213
  npm run build:app # dist/\uFF1A\u72EC\u7ACB\u5E94\u7528\uFF0C\u4F7F\u7528 npm \u5305
200
214
  npx epxing lib # lib/\uFF1A\u9ED8\u8BA4\u6309\u9700\u4EA7\u54C1\u5E93
201
215
  npx epxing lib --full # lib/\uFF1A\u5B8C\u6574\u4EA7\u54C1\u5E93
202
- npm run build:lib # \u76F4\u63A5 Vite \u5B8C\u6574\u5E93\u6784\u5EFA
216
+ npm run build:lib # \u9ED8\u8BA4\u61D2\u52A0\u8F7D\uFF0C\u4E0A\u4F20\u6574\u4E2A lib/ \u76EE\u5F55
217
+ npm run build:lib --full # \u663E\u5F0F\u5168\u91CF\u6784\u5EFA\uFF0C\u4E5F\u53EF\u7528 build:lib:full
203
218
  npm run build:lib:lazy # \u663E\u5F0F\u6309\u9700\u5E93\u6784\u5EFA
204
219
  \`\`\`
205
220
 
@@ -232,4 +247,4 @@ epxing --version
232
247
  \`\`\`
233
248
 
234
249
  \u6D4B\u8BD5\u7248\u4F7F\u7528 beta \u6807\u7B7E\uFF1B\u4EA7\u54C1\u5C06 @epxing \u5E73\u53F0\u5305\u56FA\u5B9A\u5728\u540C\u4E00\u5DF2\u9A8C\u8BC1\u7248\u672C\u3002CLI \u66F4\u65B0\u4E0D\u4F1A\u81EA\u52A8\u6539\u4EA7\u54C1\u4F9D\u8D56\uFF0C\u6309 migrate \u9884\u89C8\u3001\u5BA1\u9605\u3001\u5E94\u7528\u3001\u5B89\u88C5\u3001\u6784\u5EFA\u548C\u9A8C\u6536\u7684\u987A\u5E8F\u66F4\u65B0\u3002
235
- `;export{c as a,m as b,u as c,d};
250
+ `;export{a,c as b,l as c,g as d,x as e};