-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
35 lines (30 loc) · 871 Bytes
/
test.js
File metadata and controls
35 lines (30 loc) · 871 Bytes
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
var gpp = require('./src/index.js');
var args = process.argv[2];
var value = process.argv[3];
const shell = require('shelljs');
const inquirer = require("inquirer");
const fs = require('fs-extra');
const path = require('path');
if (args === 'add') {
gpp.branchAdd(value);
} else if (args === 'remove') {
gpp.branchRemove(value);
} else if (args === 'o') {
gpp.gitMaster(args, value);
} else if (args === 'rc') {
gpp.npmrc(`${process.cwd()}`);
} else if (args === 'gulp') {
gpp.npmrc(args);
} else if (args === 'debug') {
nodeDebug(process.argv[3], process.argv[4]);
} else {
gpp.gitPullPush();
}
function nodeDebug(value, command) {
if (value === 'gulp') {
shell.exec(
`node --inspect-brk node_modules${path.sep}gulp${path.sep}bin${path.sep}gulp ${command}`, {
async: false
});
}
}