Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
🌱 Add --version option
Browse files Browse the repository at this point in the history
Closes #350
  • Loading branch information
willclarktech committed Nov 21, 2017
1 parent 5f97790 commit 599c730
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion bin/lisky
Expand Up @@ -32,10 +32,21 @@ function exit(code) {
process.exit(code || 0);
}

if (process.argv[2] === 'clean') {
// eslint-disable-next-line default-case
switch (process.argv[2]) {
case 'clean':
console.warn('\x1b[33m', 'WARNING: Attempting to remove configuration lockfile. I hope you know what you’re doing.', '\x1b[0m');
lockfile.unlockSync(configLockfilePath);
exit();
break;
case '--version':
case '-v':
// eslint-disable-next-line global-require
console.info(require('../package.json').version);
exit();
break;
default:
// continue...
}

lisky = require('../dist').default;
Expand Down

0 comments on commit 599c730

Please sign in to comment.