forked from jsay-api/b7beet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunner.js
49 lines (45 loc) · 1.13 KB
/
runner.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'use strict'
// ##
// # --production ) for production run ------------------------- || default false
// # --npm-install ) for 'npm install' ------------------------ || default false
// # --bower-install ) for 'bower install' ----------------- || default false
// # --git-branch ) for 'git pull origin {{branch}}' ---------- || default master
// # --git-pull ) for 'git pull origin {{"master" || branch}}' --- || default true
// ##
require('shelljs/global');
var argv = require('minimist')(process.argv.slice(2));
const execStrings = {
production: {
run: false,
exec: `NODE_ENV=production port=80 gulp serve:dist`,
order: ''
},
development: {
run: true,
exec: this,
order: ''
},
docker: {
run: false,
arguments: `DOCKER=true `
},
npm: {
run: false,
exec: `npm intsall`,
order: ''
},
bower: {
run: false,
exec: `bower install`,
order: ''
},
gitPull: {
run : true,
arguments: {
branch: 'master'
},
exec: 'git pull origin ' + this,
order: ''
}
}
console.log(execStrings.development.exec);