Skip to content

Commit 91d6ef6

Browse files
authored
Output plain version number (#335)
Fixes #334
1 parent e2bed8c commit 91d6ef6

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

lib/args.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,6 @@ const logo = `
1313
//_____||___*_________*___||_____//
1414
`
1515

16-
const cli = require('../package.json').version
17-
const version = chalk.bold.red(`
18-
/|\\
19-
// //
20-
// //
21-
//___*___*___//
22-
//--*---------*--//
23-
/|| * * ||/
24-
// ||* v${cli} *|| //
25-
// || * * || //
26-
//_____||___*_________*___||_____//
27-
`)
28-
2916
module.exports = require('yargs')
3017
.usage(
3118
`${chalk.bold.red(logo)}
@@ -125,7 +112,6 @@ Usage:
125112
desc: 'Set a custom directory to look for a config file',
126113
type: 'string',
127114
})
128-
.version(version)
129115
.alias('h', 'help')
130116
.example('$0 input.css -o output.css', 'Basic usage')
131117
.example('$0 src/**/*.css --base src --dir build', 'Glob Pattern & output')

test/misc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test('--version', async (t) => {
1616
t.falsy(version.error)
1717

1818
t.truthy(
19-
version.stdout.length > 10,
19+
version.stdout.length > 5,
2020
'expected --version to output version info'
2121
)
2222
})

0 commit comments

Comments
 (0)