@hlw-uni/mp-cli 1.0.34 → 1.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni/mp-cli",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "uniapp 小程序脚手架生成器",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -0,0 +1,10 @@
1
+ {
2
+ "recommendations": [
3
+ "vue.volar",
4
+ "dbaeumer.vscode-eslint",
5
+ "esbenp.prettier-vscode",
6
+ "stylelint.vscode-stylelint",
7
+ "lokalise.i18n-ally",
8
+ "bradlc.vscode-tailwindcss"
9
+ ]
10
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "[html]": {
3
+ "editor.formatOnSave": false,
4
+ "editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
5
+ "php.validate.enable": false,
6
+ "php.suggest.basic": false,
7
+ "php.proposeExtensionWorkarounds": true
8
+ },
9
+ "workbench.tree.indent": 26,
10
+ "workbench.tree.renderIndentGuides": "always",
11
+ "window.zoomLevel": 1.4,
12
+ "editor.fontFamily": "JetBrains Mono, Consolas, 'Courier New', monospace",
13
+ "editor.tabSize": 4,
14
+ "editor.insertSpaces": true,
15
+ "editor.detectIndentation": false,
16
+ "editor.wordWrap": "on",
17
+ "editor.renderLineHighlight": "all",
18
+ "editor.smoothScrolling": true,
19
+ "editor.cursorSurroundingLines": 8,
20
+ "editor.lineHeight": 24,
21
+ "editor.rulers": [80, 120],
22
+ "editor.guides.indentation": true,
23
+ "editor.guides.highlightActiveIndentation": true,
24
+ "editor.guides.bracketPairs": "active",
25
+ "workbench.colorCustomizations": {
26
+ "editorIndentGuide.background1": "#2A2A2A",
27
+ "editorIndentGuide.activeBackground1": "#dedede"
28
+ },
29
+ "workbench.editor.enablePreview": false,
30
+ "workbench.editor.enablePreviewFromQuickOpen": false,
31
+ "vue.server.hybridMode": "auto",
32
+ "git.ignoreLimitWarning": true,
33
+ "htmlhint.enable": false,
34
+ "kiroAgent.configureMCP": "Disabled"
35
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "recommendations": [
3
+ "vue.volar",
4
+ "dbaeumer.vscode-eslint",
5
+ "esbenp.prettier-vscode",
6
+ "stylelint.vscode-stylelint",
7
+ "lokalise.i18n-ally",
8
+ "bradlc.vscode-tailwindcss"
9
+ ]
10
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "[html]": {
3
+ "editor.formatOnSave": false,
4
+ "editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
5
+ "php.validate.enable": false,
6
+ "php.suggest.basic": false,
7
+ "php.proposeExtensionWorkarounds": true
8
+ },
9
+ "workbench.tree.indent": 26,
10
+ "workbench.tree.renderIndentGuides": "always",
11
+ "window.zoomLevel": 1.4,
12
+ "editor.fontFamily": "JetBrains Mono, Consolas, 'Courier New', monospace",
13
+ "editor.tabSize": 4,
14
+ "editor.insertSpaces": true,
15
+ "editor.detectIndentation": false,
16
+ "editor.wordWrap": "on",
17
+ "editor.renderLineHighlight": "all",
18
+ "editor.smoothScrolling": true,
19
+ "editor.cursorSurroundingLines": 8,
20
+ "editor.lineHeight": 24,
21
+ "editor.rulers": [80, 120],
22
+ "editor.guides.indentation": true,
23
+ "editor.guides.highlightActiveIndentation": true,
24
+ "editor.guides.bracketPairs": "active",
25
+ "workbench.colorCustomizations": {
26
+ "editorIndentGuide.background1": "#2A2A2A",
27
+ "editorIndentGuide.activeBackground1": "#dedede"
28
+ },
29
+ "workbench.editor.enablePreview": false,
30
+ "workbench.editor.enablePreviewFromQuickOpen": false,
31
+ "vue.server.hybridMode": "auto",
32
+ "git.ignoreLimitWarning": true,
33
+ "htmlhint.enable": false,
34
+ "kiroAgent.configureMCP": "Disabled"
35
+ }
package/bin/cli.ts DELETED
@@ -1,491 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * hlw-uni CLI — TypeScript 版本(由 tsx 直接执行)
4
- */
5
- import { Command } from 'commander';
6
- import chalk from 'chalk';
7
- import inquirer from 'inquirer';
8
- import ora from 'ora';
9
- import path from 'path';
10
- import fs from 'fs-extra';
11
-
12
- interface Platform { id: string; name: string; templateCount: number; }
13
- interface Template { id: string; name: string; description: string; }
14
- interface PlatformConfig { id: string; name: string; templates: Template[]; }
15
-
16
- const cwd = process.cwd();
17
- const version = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf-8')).version;
18
-
19
- function toKebabCase(name: string): string {
20
- return name.replace(/([A-Z])/g, '-$1').toLowerCase().replace(/^-/, '');
21
- }
22
-
23
- function isValidProjectName(name: string): boolean {
24
- return /^[a-z][a-z0-9-]*$/.test(name);
25
- }
26
-
27
- async function copyDir(src: string, dest: string, options: { overwrite?: boolean; skipFiles?: string[] } = {}) {
28
- const { overwrite = true, skipFiles = [] } = options;
29
- if (!(await fs.pathExists(src))) return;
30
- await fs.ensureDir(dest);
31
- const entries = await fs.readdir(src, { withFileTypes: true });
32
- for (const entry of entries) {
33
- if (skipFiles.includes(entry.name)) continue;
34
- const srcPath = path.join(src, entry.name);
35
- const destPath = path.join(dest, entry.name);
36
- if (entry.isDirectory()) {
37
- await copyDir(srcPath, destPath, options);
38
- } else {
39
- if (overwrite || !(await fs.pathExists(destPath))) {
40
- // 用原生 copyFile 而非 fs-extra.copy,确保二进制文件(PNG 等)不被 Text 模式破坏
41
- await fs.copyFile(srcPath, destPath);
42
- }
43
- }
44
- }
45
- }
46
-
47
- /**
48
- * 通用判断:文件是否可视为文本(用于决定是否做模板变量替换)。
49
- * 策略:按扩展名白名单快速判断;未知扩展名则读文件头字节做字符编码检测。
50
- */
51
- const TEXT_EXTS = new Set([
52
- '.vue', '.ts', '.tsx', '.js', '.jsx', '.mjs', '.mts',
53
- '.json', '.jsonc',
54
- '.css', '.scss', '.sass', '.less',
55
- '.html', '.htm', '.xml',
56
- '.svg',
57
- '.md', '.markdown',
58
- '.txt', '.env', '.gitignore', '.prettierrc', '.editorconfig',
59
- '.yaml', '.yml', '.toml',
60
- ]);
61
-
62
- function isTextFile(filePath: string): boolean {
63
- const ext = path.extname(filePath).toLowerCase();
64
- if (TEXT_EXTS.has(ext)) return true;
65
- // 未知扩展名:读前 8KB 做编码检测,超出可打印 ASCII/UTF-8/控制字符范围则判定为二进制
66
- const buf = Buffer.alloc(8192);
67
- let fd: number | undefined;
68
- try {
69
- fd = fs.openSync(filePath, 'r');
70
- const n = fs.readSync(fd, buf, 0, buf.length, 0);
71
- const sample = buf.subarray(0, n);
72
- if (sample.includes(0)) return false; // 含 null 字节(PNG/字体等)→ 二进制
73
- // 超过 1% 的字节是不可打印的(排除换行/回车/制表)→ 二进制
74
- let bad = 0;
75
- for (const b of sample) {
76
- const printable = (b >= 32 && b <= 126) || b === 9 || b === 10 || b === 13;
77
- if (!printable) bad++;
78
- }
79
- return bad / sample.length < 0.01;
80
- } finally {
81
- if (fd !== undefined) fs.closeSync(fd);
82
- }
83
- }
84
-
85
- async function replaceTemplateVars(dir: string, vars: Record<string, string>) {
86
- const files = await fs.readdir(dir, { withFileTypes: true });
87
- for (const file of files) {
88
- const filePath = path.join(dir, file.name);
89
- if (file.isDirectory()) {
90
- await replaceTemplateVars(filePath, vars);
91
- } else {
92
- // 二进制文件直接跳过,不读不写,完全保留原始内容
93
- if (!isTextFile(filePath)) continue;
94
-
95
- let content = await fs.readFile(filePath, 'utf-8');
96
- let changed = false;
97
- for (const [key, value] of Object.entries(vars)) {
98
- const before = content;
99
- content = content.replace(new RegExp(`{{${key}}}`, 'g'), value);
100
- if (content !== before) changed = true;
101
- }
102
- if (changed) await fs.writeFile(filePath, content);
103
- }
104
- }
105
- }
106
-
107
- function printBanner() {
108
- const c = chalk;
109
-
110
- function visualWidth(s: string): number {
111
- let w = 0;
112
- for (const ch of s) {
113
- const code = ch.codePointAt(0)!;
114
- if ((code >= 0x2e80 && code <= 0x9fff) || (code >= 0xff00 && code <= 0xffef)) w += 2;
115
- else w += 1;
116
- }
117
- return w;
118
- }
119
-
120
- const W = 50;
121
- const ind = ' ';
122
-
123
- const row = (plain: string, colored: string) => {
124
- const pad = ' '.repeat(Math.max(0, W - visualWidth(plain)));
125
- console.log(`${ind}${c.dim('│')} ${colored}${pad} ${c.dim('│')}`);
126
- };
127
- const blank = () => console.log(`${ind}${c.dim('│')}${' '.repeat(W + 2)}${c.dim('│')}`);
128
-
129
- // 工具名:字母间距 + 三段渐变色(cyan → blue → magenta)
130
- const nameChars = 'hlw-uni-mp'.split('');
131
- const nameColors = [c.cyanBright, c.cyanBright, c.cyanBright, c.dim,
132
- c.blueBright, c.blueBright, c.blueBright, c.dim,
133
- c.magentaBright, c.magentaBright];
134
- const nameGrad = nameChars.map((ch, i) => nameColors[i](ch)).join(c.dim(' '));
135
- const namePlain = 'h l w - u n i - m p'; // 19 chars,用于宽度计算
136
-
137
- // 版本徽章 + 标题行排版
138
- const badge = ` v${version} `;
139
- const titleGap = W - 3 /* ✻ */ - namePlain.length - badge.length;
140
- const titleLine = c.cyan('✻') + ' ' + nameGrad
141
- + ' '.repeat(Math.max(0, titleGap))
142
- + c.bgCyan.black(badge);
143
-
144
- // 命令行(两列对齐)
145
- const cmdColW = 16;
146
- const cmdRow = (cmd: string, arg: string, desc: string) => {
147
- const full = arg ? `${cmd} ${arg}` : cmd;
148
- const padLen = Math.max(0, cmdColW - full.length);
149
- const plain = ` ❯ ${full}${' '.repeat(padLen)}${desc}`;
150
- const colored = ` ${c.cyan('❯')} ${c.bold.white(cmd)}`
151
- + (arg ? ` ${c.dim(arg)}` : '')
152
- + ' '.repeat(padLen)
153
- + c.dim(desc);
154
- row(plain, colored);
155
- };
156
-
157
- console.log();
158
- console.log(`${ind}${c.dim('╭' + '─'.repeat(W + 2) + '╮')}`);
159
- blank();
160
- console.log(`${ind}${c.dim('│')} ${titleLine} ${c.dim('│')}`);
161
- blank();
162
- row(' UniApp 小程序脚手架生成器', ` ${c.white('UniApp 小程序脚手架生成器')}`);
163
- blank();
164
- cmdRow('create', '<name>', '开始创建新项目');
165
- cmdRow('--help', '', '查看所有命令');
166
- blank();
167
- console.log(`${ind}${c.dim('╰' + '─'.repeat(W + 2) + '╯')}`);
168
- console.log();
169
- }
170
-
171
- // 加载模板配置
172
- const config = require('../templates/config');
173
- const platforms = config.platforms as Platform[];
174
- const platformConfigs = config.platformConfigs as PlatformConfig[];
175
-
176
- function getPlatformConfig(platform: string): PlatformConfig | null {
177
- return config.getPlatformConfig(platform);
178
- }
179
-
180
- function getStyleTemplate(platform: string, templateId: string): Template | undefined {
181
- return config.getStyleTemplate(platform, templateId);
182
- }
183
-
184
- function getTemplatePaths(platform: string, templateId: string) {
185
- return config.getTemplatePaths(platform, templateId);
186
- }
187
-
188
- function isInteractive(): boolean {
189
- return !!process.stdin.isTTY;
190
- }
191
-
192
- async function runCreate(opts: {
193
- name: string;
194
- description: string;
195
- author: string;
196
- platform: string;
197
- template: string;
198
- }) {
199
- const { name, description, author, platform, template } = opts;
200
- const projectPath = path.join(cwd, name);
201
-
202
- if (!isValidProjectName(name)) {
203
- console.log();
204
- console.log(` ${chalk.red('✗')} ${chalk.red.bold('无效的项目名称:')} ${chalk.red(name)}`);
205
- console.log(chalk.gray(' (只能包含小写字母、数字、连字符,且以字母开头)'));
206
- console.log();
207
- return;
208
- }
209
-
210
- if (await fs.pathExists(projectPath)) {
211
- console.log();
212
- console.log(` ${chalk.yellow('⚠')} ${chalk.yellow.bold('目录已存在:')} ${chalk.yellow(name)}`);
213
- console.log(chalk.gray(' (请先删除或使用其他名称)'));
214
- console.log();
215
- return;
216
- }
217
-
218
- const styleTemplate = getStyleTemplate(platform, template) as Template;
219
-
220
- console.log(chalk.white(`[2/4] 使用平台: ${getPlatformConfig(platform)?.name},模板: ${styleTemplate?.name ?? template}`));
221
- console.log(chalk.white('[3/4] 配置项目信息'));
222
- console.log(chalk.white(` - 项目名称: ${name}`));
223
- console.log(chalk.white(` - 项目描述: ${description}`));
224
- if (author) console.log(chalk.white(` - 作者: ${author}`));
225
- console.log();
226
-
227
- console.log(chalk.white('[4/4] 正在创建项目...'));
228
-
229
- const { basePath, templatePath } = getTemplatePaths(platform, template);
230
- const spinner = ora({ text: ' 复制模板文件...', spinner: 'material', color: 'cyan' }).start();
231
-
232
- await fs.ensureDir(projectPath);
233
- await copyDir(basePath as string, projectPath, { overwrite: true });
234
- await copyDir(templatePath as string, projectPath, { overwrite: true, skipFiles: ['template.json'] });
235
-
236
- await replaceTemplateVars(projectPath, {
237
- name,
238
- description,
239
- author,
240
- date: new Date().toISOString().split('T')[0],
241
- });
242
-
243
- spinner.succeed();
244
- console.log();
245
- console.log(` ${chalk.green('✓')} ${chalk.bold.green('项目创建成功')} ${chalk.gray(`${name}`)}`);
246
- console.log();
247
- console.log(` ${chalk.cyan('▸')} ${chalk.gray('cd')} ${chalk.white(name)} ${chalk.gray('&& npm install && npm run dev:mp-weixin')}`);
248
- console.log();
249
- }
250
-
251
- const program = new Command();
252
- program
253
- .name('hlw-uni-mp')
254
- .description('UniApp 小程序脚手架生成器')
255
- .version(version);
256
-
257
- program
258
- .command('create [name]')
259
- .description('创建一个新的 uniapp 项目')
260
- .option('-p, --platform <platform>', '指定平台 (mp-weixin/mp-toutiao)')
261
- .option('-t, --template <template>', '指定模板 ID')
262
- .option('-d, --description <description>', '项目描述')
263
- .option('-a, --author <author>', '作者名称')
264
- .option('--ci', '非交互模式,使用默认选项')
265
- .action(async (name?: string, opts?: Record<string, unknown>) => {
266
- try {
267
- printBanner();
268
-
269
- const options = {
270
- name: name || (opts?.name as string | undefined),
271
- platform: opts?.platform as string | undefined,
272
- template: opts?.template as string | undefined,
273
- description: opts?.description as string | undefined,
274
- author: opts?.author as string | undefined,
275
- ci: opts?.ci as boolean | undefined,
276
- };
277
-
278
- const ci = options.ci || !isInteractive();
279
-
280
- if (ci) {
281
- console.log(` ${chalk.yellow('⚡')} ${chalk.yellow.bold('非交互模式')} ${chalk.gray('使用默认选项')}`);
282
- console.log();
283
-
284
- const platform = options.platform || platforms[0]?.id || 'mp-weixin';
285
- const platformConfig = getPlatformConfig(platform);
286
- const template = options.template || platformConfig?.templates[0]?.id || 'template1';
287
- const styleTemplate = getStyleTemplate(platform, template) as Template;
288
-
289
- if (!isValidProjectName(options.name || 'my-uniapp-app')) {
290
- console.log();
291
- console.log(` ${chalk.red('✗')} ${chalk.red.bold('无效的项目名称:')} ${chalk.red(options.name)}`);
292
- console.log(chalk.gray(' (只能包含小写字母、数字、连字符,且以字母开头)'));
293
- console.log();
294
- return;
295
- }
296
-
297
- await runCreate({
298
- name: options.name || 'my-uniapp-app',
299
- description: options.description || '基于 hlw-uni 脚手架创建',
300
- author: options.author || '',
301
- platform,
302
- template,
303
- });
304
- return;
305
- }
306
-
307
- let platform = options.platform || platforms[0]?.id;
308
- let template = options.template;
309
-
310
- console.log(chalk.white('[1/4] 选择目标平台'));
311
- if (!options.platform) {
312
- const answer = await inquirer.prompt([{
313
- type: 'list',
314
- name: 'platform',
315
- message: '请选择目标平台:',
316
- choices: platforms.map((p: Platform) => ({
317
- name: `${p.name} (${p.templateCount} 套模板)`,
318
- value: p.id,
319
- })),
320
- default: platforms[0]?.id,
321
- }]);
322
- platform = answer.platform;
323
- } else {
324
- console.log(chalk.white(` 已指定: ${platform}\n`));
325
- }
326
-
327
- const platformConfig = getPlatformConfig(platform!) as PlatformConfig;
328
-
329
- console.log(chalk.white(`[2/4] 选择 ${platformConfig.name} 风格模板`));
330
- if (!template) {
331
- const answer = await inquirer.prompt([{
332
- type: 'list',
333
- name: 'template',
334
- message: '请选择风格模板:',
335
- choices: platformConfig.templates.map((t: Template) => ({
336
- name: t.name,
337
- value: t.id,
338
- })),
339
- default: platformConfig.templates[0]?.id,
340
- }]);
341
- template = answer.template;
342
- } else {
343
- console.log(chalk.white(` 已指定: ${template}\n`));
344
- }
345
-
346
- console.log(chalk.white('[3/4] 配置项目信息'));
347
- const answers = await inquirer.prompt([
348
- {
349
- type: 'input',
350
- name: 'projectName',
351
- message: '项目名称:',
352
- default: options.name || 'my-uniapp-app',
353
- validate: (v: string) => isValidProjectName(v) ? true : '请输入小写字母、数字或连字符,且以字母开头',
354
- },
355
- {
356
- type: 'input',
357
- name: 'description',
358
- message: '项目描述:',
359
- default: options.description || '基于 hlw-uni 脚手架创建',
360
- },
361
- {
362
- type: 'input',
363
- name: 'author',
364
- message: '作者名称:',
365
- default: options.author || '',
366
- },
367
- ]);
368
-
369
- await runCreate({
370
- name: answers.projectName,
371
- description: answers.description,
372
- author: answers.author,
373
- platform: platform!,
374
- template: template!,
375
- });
376
- } catch (error) {
377
- console.log();
378
- console.log(` ${chalk.red('✗')} ${chalk.red.bold('创建失败:')} ${chalk.red((error as Error).message)}`);
379
- console.log();
380
- process.exit(1);
381
- }
382
- });
383
-
384
- program
385
- .command('add <type> [name]')
386
- .description('添加页面或组件')
387
- .option('--ci', '非交互模式,使用默认选项')
388
- .action(async (type: string, name?: string, opts?: Record<string, unknown>) => {
389
- const ci = (opts?.ci as boolean) || !isInteractive();
390
- const itemType = type === 'page' ? '页面' : '组件';
391
- printBanner();
392
-
393
- let itemName = name;
394
-
395
- if (!ci) {
396
- const answer = await inquirer.prompt([{
397
- type: 'input',
398
- name: 'itemName',
399
- message: `${itemType}名称:`,
400
- default: name || '',
401
- validate: (v: string) => v.trim() ? true : '名称不能为空',
402
- }]);
403
- itemName = answer.itemName;
404
- }
405
-
406
- if (!itemName?.trim()) {
407
- console.log();
408
- console.log(` ${chalk.red('✗')} ${chalk.red.bold(`${itemType}名称不能为空`)}`);
409
- console.log();
410
- return;
411
- }
412
-
413
- const kebabName = toKebabCase(itemName);
414
- const spinner = ora({ text: ` 创建${itemType} ${itemName}...`, spinner: 'material', color: 'cyan' }).start();
415
-
416
- if (type === 'page') {
417
- const pagesDir = path.join(cwd, 'src', 'pages', kebabName);
418
- await fs.ensureDir(pagesDir);
419
- await fs.writeFile(
420
- path.join(pagesDir, 'index.vue'),
421
- `<template>
422
- <view class="${kebabName}-page">
423
- <text class="title">${itemName}</text>
424
- </view>
425
- </template>
426
- <script setup lang="ts">
427
- onLoad(() => { console.log('${itemName} 页面加载') })
428
- </script>
429
- <style scoped lang="scss">
430
- .${kebabName}-page { padding: 32rpx; }
431
- .title { font-size: 36rpx; font-weight: bold; }
432
- </style>`,
433
- );
434
-
435
- const pagesJsonPath = path.join(cwd, 'src', 'pages.json');
436
- if (await fs.pathExists(pagesJsonPath)) {
437
- const pagesJson = await fs.readJson(pagesJsonPath);
438
- const routePath = `pages/${kebabName}/index`;
439
- if (!pagesJson.pages.find((p: { path: string }) => p.path === routePath)) {
440
- pagesJson.pages.push({ path: routePath, style: { navigationBarTitleText: itemName } });
441
- await fs.writeJson(pagesJsonPath, pagesJson, { spaces: 2 });
442
- }
443
- }
444
- } else if (type === 'component') {
445
- const componentsDir = path.join(cwd, 'src', 'components', kebabName);
446
- await fs.ensureDir(componentsDir);
447
- await fs.writeFile(
448
- path.join(componentsDir, 'index.vue'),
449
- `<template>
450
- <view class="${kebabName}"><slot></slot></view>
451
- </template>
452
- <script setup lang="ts">
453
- defineProps<{ title?: string }>()
454
- </script>
455
- <style scoped lang="scss">
456
- .${kebabName} { display: flex; }
457
- </style>`,
458
- );
459
- }
460
-
461
- spinner.succeed();
462
- console.log();
463
- console.log(` ${chalk.green('✓')} ${chalk.bold.green(`${itemType}创建成功`)} ${chalk.gray(`${itemName}`)}`);
464
- console.log();
465
- });
466
-
467
- program
468
- .command('list')
469
- .description('列出所有可用的平台和模板')
470
- .action(() => {
471
- const W = 62;
472
- const c = chalk;
473
-
474
- console.log();
475
- console.log(c.cyan.bold(' ' + '═'.repeat(W)));
476
- console.log();
477
- console.log(c.cyan(` ${'可用的平台和模板'.padStart(30).padEnd(W)}`));
478
- console.log(c.gray(` ${'完整的平台和模板列表'.padStart(30).padEnd(W)}`));
479
- console.log();
480
- console.log(c.cyan.bold(' ' + '═'.repeat(W)));
481
- console.log();
482
- platformConfigs.forEach((platform: PlatformConfig) => {
483
- console.log(` ${chalk.bold.cyan('▸')} ${chalk.bold.white(platform.name)}`);
484
- platform.templates.forEach((t: Template, i: number) => {
485
- console.log(` ${chalk.gray(`${i + 1}.`)} ${t.name}`);
486
- });
487
- console.log();
488
- });
489
- });
490
-
491
- program.parse();
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "module": "ESNext",
5
- "moduleResolution": "Node",
6
- "resolveJsonModule": true,
7
- "jsx": "preserve",
8
- "strict": true,
9
- "noImplicitThis": true,
10
- "isolatedModules": true,
11
- "esModuleInterop": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "skipLibCheck": true,
14
- "verbatimModuleSyntax": false,
15
- "paths": {
16
- "@/*": ["./src/*"]
17
- }
18
- },
19
- "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
20
- "exclude": ["node_modules", "dist", "unpackage"]
21
- }
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "module": "ESNext",
5
- "moduleResolution": "Node",
6
- "resolveJsonModule": true,
7
- "jsx": "preserve",
8
- "strict": true,
9
- "noImplicitThis": true,
10
- "isolatedModules": true,
11
- "esModuleInterop": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "skipLibCheck": true,
14
- "verbatimModuleSyntax": false,
15
- "paths": {
16
- "@/*": ["./src/*"]
17
- }
18
- },
19
- "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
20
- "exclude": ["node_modules", "dist", "unpackage"]
21
- }
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "CommonJS",
5
- "moduleResolution": "node",
6
- "esModuleInterop": true,
7
- "allowSyntheticDefaultImports": true,
8
- "strict": false,
9
- "skipLibCheck": true,
10
- "resolveJsonModule": true,
11
- "types": ["node"],
12
- "outDir": "dist"
13
- },
14
- "include": ["bin/**/*.ts"],
15
- "exclude": ["node_modules", "dist", "templates"]
16
- }