-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage-scripts.js
More file actions
58 lines (55 loc) · 1.43 KB
/
package-scripts.js
File metadata and controls
58 lines (55 loc) · 1.43 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
47
48
49
50
51
52
53
54
55
56
57
58
const { concurrent, series } = require('nps-utils')
const CLIENT = 'client/'
const SERVER = 'server/'
// const START_NPS = 'nps'
const START_NPM = 'npm run start'
module.exports = {
scripts: {
default: 'nps start',
start: {
default: concurrent({
FE: {
script: `cd ${CLIENT} && ${START_NPM}`,
color: 'blue.bold',
},
BE: {
script: `cd ${SERVER} && ${START_NPM}`,
color: 'green.bold',
},
}),
FE: {
script: `cd ${CLIENT} && ${START_NPM}`,
color: 'blue.bold',
},
BE: {
script: `cd ${SERVER} && ${START_NPM}`,
color: 'green.bold',
},
},
setup: {
default: concurrent({
FE: {
script: 'nps setup.FE',
color: 'blue.bold',
},
BE: {
script: 'nps setup.BE',
color: 'green.bold',
},
}),
FE: {
// default: series.nps('setup.FE.npm', 'setup.FE.env'),
default: series.nps('setup.FE.npm'),
npm:`cd ${CLIENT} && npm i -D`,
// env: `cd ${CLIENT} && cp .env.example .env.development`,
},
BE: {
// default: series.nps('setup.BE.npm', 'setup.BE.env'),
default: series.nps('setup.BE.npm'),
npm:`cd ${SERVER} && npm i -D`,
// env: `cd ${SERVER} && cp .env.example .env.development`,
},
},
test: 'echo "Error: no test specified" && exit 1',
}
};