Skip to content

Commit 26d4d70

Browse files
committed
feat: add version check ignore
1 parent d592109 commit 26d4d70

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/create/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ import render, { ArgvType, pathAndRepoUrlGenerator } from './render';
77
export { ArgvType }
88
export default async (argv: ArgvType, macros: MacrosType) => {
99
try {
10-
await checkCurrentRepoVersion(macros.scriptName)
10+
// 如果有 -c 则忽略版本检查
11+
if (!argv.c) {
12+
await checkCurrentRepoVersion(macros.scriptName)
13+
}
1114
} catch(e) {}
1215
const generatorValues = pathAndRepoUrlGenerator(argv, macros);
13-
// TODO
1416
render(generatorValues, macros)
1517
}
1618

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ export function run(args: string[]) {
3232
describe: 'create remax typescript app',
3333
type: 'boolean'
3434
})
35+
.option('c', {
36+
alias: 'check',
37+
default: false,
38+
describe: 'ignore version check',
39+
type: 'boolean'
40+
})
3541
.fail((msg: string, err: Error) => {
3642
if (err) throw err
3743
console.error('Please specify the project directory:')

0 commit comments

Comments
 (0)