Skip to content

Commit

Permalink
feat: add -v|--version argument option to cli command
Browse files Browse the repository at this point in the history
  • Loading branch information
vysinsky committed May 16, 2022
1 parent 17dd7ff commit ddbf353
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/sfcc-playground.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/env node
const { run } = require('../src/app');
const arg = process.argv[2];

run();
if (arg === '-v' || arg === '--version') {
const { version } = require('../package.json');

process.stdout.write(version + '\n');
return;
}

require('../src/app').run();

0 comments on commit ddbf353

Please sign in to comment.