Total Complexity | 4 |
Complexity/F | 2 |
Lines of Code | 45 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | var program = require('commander'); |
||
2 | var shell = require('shelljs'); |
||
3 | var chalk = require('chalk'); |
||
4 | var co = require('co'); |
||
5 | var prompt = require('co-prompt'); |
||
6 | |||
7 | // .arguments('<file>') |
||
8 | // .option('-u, --username <username>', 'The user to authenticate as') |
||
9 | // .option('-p, --password <password>', 'The user\'s password') |
||
10 | program |
||
11 | .usage('[options] <enviroment ...>') |
||
12 | // .option('-u, --username <username>', 'The user to authenticate as') |
||
13 | .arguments('<enviroment>') |
||
14 | .action(function(enviroment) { |
||
15 | |||
16 | shell.mkdir('-p',['applications/assets/icons']); |
||
17 | |||
18 | shell.echo('Build Server Vagrant ('+enviroment+')'); |
||
19 | |||
20 | if ( enviroment === 'dev' ){ |
||
21 | |||
22 | // "clean:key": "rimraf server/plays/ssh/*.key && rimraf server/plays/ssh/*.pub", |
||
23 | // "clean:ssl": "rimraf server/plays/ssl/*.key && rimraf server/plays/ssl/*.crt && rimraf server/plays/ssl/*.pem", |
||
24 | |||
25 | // npm run clean:key && npm run clean:ssl && rimraf server/roles/external/* |
||
26 | // && |
||
27 | //cd server && vagrant destroy -f |
||
28 | |||
29 | } else { |
||
30 | |||
31 | //NOTHING ??? |
||
32 | |||
33 | } |
||
34 | |||
35 | }) |
||
36 | .parse(process.argv); |
||
37 | |||
38 | |||
39 | if (!process.argv.slice(2).length) { |
||
40 | program.outputHelp(make_red); |
||
41 | } |
||
42 | |||
43 | function make_red(txt) { |
||
44 | return chalk.red(txt); //display the help text in red on the console |
||
45 | } |
||
46 | |||
48 |