Skip to content

Commit 43fc5db

Browse files
committed
Coerce --ext to start with a period
1 parent 9b4eb95 commit 43fc5db

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ Usage:
9191
.option('x', {
9292
alias: 'ext',
9393
desc: 'Override the output file extension',
94-
type: 'string'
94+
type: 'string',
95+
coerce (ext) {
96+
if (ext.indexOf('.') !== 0) return '.' + ext
97+
return ext
98+
}
9599
})
96100
.option('e', {
97101
alias: 'env',

0 commit comments

Comments
 (0)