create-vuexir 0.5.7 → 0.7.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/bin/create.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* create-vuexir —— 脚手架:npx create-vuexir my-app
|
|
4
|
-
* 生成最小可跑工程:src/router.ts + src/pages/Home.vue + About.vue +
|
|
4
|
+
* 生成最小可跑工程:src/router.ts + src/pages/Home.vue + About.vue + vuexir.config.ts + package.json
|
|
5
5
|
* 之后:npm i && npx vuexir gen ios|android
|
|
6
6
|
*/
|
|
7
7
|
import { cpSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
@@ -13,7 +13,7 @@ const here = dirname(fileURLToPath(import.meta.url));
|
|
|
13
13
|
const tpl = join(here, '..', 'templates', 'app');
|
|
14
14
|
|
|
15
15
|
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
16
|
-
console.log('用法:npx create-vuexir [目录名]\n生成 Vue SFC 工程骨架(含 router.ts 与
|
|
16
|
+
console.log('用法:npx create-vuexir [目录名]\n生成 Vue SFC 工程骨架(含 router.ts 与 vuexir.config.ts),随后 npx vuexir gen ios|android');
|
|
17
17
|
process.exit(0);
|
|
18
18
|
}
|
|
19
19
|
if (existsSync(target)) {
|
|
@@ -34,7 +34,7 @@ const pascal = name
|
|
|
34
34
|
.filter(Boolean)
|
|
35
35
|
.map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1))
|
|
36
36
|
.join('') || 'MyApp';
|
|
37
|
-
const cfgPath = join(target, '
|
|
37
|
+
const cfgPath = join(target, 'vuexir.config.ts');
|
|
38
38
|
writeFileSync(
|
|
39
39
|
cfgPath,
|
|
40
40
|
readFileSync(cfgPath, 'utf-8')
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vuexir",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "脚手架:npx create-vrn-app my-app(Vue SFC + router.ts +
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "脚手架:npx create-vrn-app my-app(Vue SFC + router.ts + vuexir.config.ts)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
File without changes
|