Skip to content

Commit 7b6399c

Browse files
committed
6.0.4 release
2 parents 68c8865 + bf7c718 commit 7b6399c

File tree

4 files changed

+9587
-7609
lines changed

4 files changed

+9587
-7609
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 6.0.4 (December 22, 2023)
2+
3+
### template
4+
5+
* Fixed `--help` throws errors.
6+
17
## 6.0.3 (October 5, 2023)
28

39
* Updated `prettier` version to `^3.0.1` and `eslint-plugin-prettier` version to `^5.0.0`.

commands/template.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -290,19 +290,19 @@ function api({action, target, name} = {}) {
290290
}
291291

292292
function cli(args) {
293-
const opts = minimist(args, {
294-
boolean: ['help'],
295-
alias: {h: 'help'}
296-
});
297-
if (opts.help) displayHelp();
298-
299-
const action = opts._[0];
300-
const target = opts._[1] || process.cwd();
301-
const name = ['install', 'link'].includes(action) ? opts._[2] : opts._[1];
302-
if (!action) displayHelp();
303-
304293
import('chalk').then(({default: _chalk}) => {
305294
chalk = _chalk;
295+
const opts = minimist(args, {
296+
boolean: ['help'],
297+
alias: {h: 'help'}
298+
});
299+
if (opts.help) displayHelp();
300+
301+
const action = opts._[0];
302+
const target = opts._[1] || process.cwd();
303+
const name = ['install', 'link'].includes(action) ? opts._[2] : opts._[1];
304+
if (!action) displayHelp();
305+
306306
api({action, name, target}).catch(err => {
307307
console.error('Template action failed.');
308308
console.error();

0 commit comments

Comments
 (0)