-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
46 lines (40 loc) · 1.14 KB
/
index.js
File metadata and controls
46 lines (40 loc) · 1.14 KB
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
const create = require('./src/create');
const args = process.argv.slice(2);
if (args.length < 3) {
console.log('Too few arguments :(');
process.exit(1);
}
const taskArg = args[0];
const typeArg = args[1];
const nameArg = args[2];
function createContainer() {
create.indexJs(nameArg);
create.indexTestJs(nameArg);
create.indexComponentJs(nameArg);
create.indexComponentTestJs(nameArg);
create.reducerJs(nameArg);
create.reducerTestJs(nameArg);
create.sagaJs(nameArg);
create.sagaTestJs(nameArg);
create.selectorsJs(nameArg);
create.selectorsTestJs(nameArg);
create.e2eTestJs(nameArg);
}
if (taskArg === 'create' && typeArg === 'firstcontainer') {
createContainer();
create.rootReducerJs(nameArg);
create.rootReducerTestJs(nameArg);
create.rootSagaJs(nameArg);
create.rootSagaTestJs(nameArg);
create.storeJs(nameArg);
create.storeTestJs(nameArg);
create.navigatorJs(nameArg);
create.navigatorTestJs(nameArg);
create.appJs(nameArg);
create.appTestJs(nameArg);
create.WebdriverIOLocalConf();
create.setupTestsJs();
} else if (taskArg === 'create' && typeArg === 'container') {
createContainer();
}
return 0;