fix: short circuit with nullish coalescing operator
MODIFY
templates/src/command.ts.ejs
templates/src/command.ts.ejs
@@ -33,7 +33,7 @@ hello world from ./src/<%- name %>.ts!
async run() {
const {args, flags} = this.parse(<%- klass %>)
- const name = flags.name || 'world'
+ const name = flags.name ?? 'world'
this.log(`hello ${name} from <%- path.replace(/\\/g, '\\\\') %>`)
if (args.file && flags.force) {
this.log(`you input --force and --file: ${args.file}`)

fix: short circuit with nullish coalescing operator (#327)