@@ -2,6 +2,9 @@ const { series, crossEnv, concurrent, rimraf, runInNewWindow } = require('nps-ut
2
2
3
3
module . exports = {
4
4
scripts : {
5
+ default : {
6
+ script : 'nps start'
7
+ } ,
5
8
/**
6
9
* Starts the builded app from the dist directory
7
10
*/
@@ -14,7 +17,7 @@ module.exports = {
14
17
serve : {
15
18
script : series (
16
19
'nps banner.serve' ,
17
- '\"./node_modules/.bin/nodemon\" --watch src --watch .env'
20
+ '\"./node_modules/.bin/nodemon\" --watch src --watch .env' ,
18
21
)
19
22
} ,
20
23
/**
@@ -24,7 +27,7 @@ module.exports = {
24
27
script : series (
25
28
'yarn install' ,
26
29
'nps db.migrate' ,
27
- 'nps db.seed'
30
+ 'nps db.seed' ,
28
31
)
29
32
} ,
30
33
/**
@@ -36,7 +39,7 @@ module.exports = {
36
39
'nps lint' ,
37
40
'nps clean.dist' ,
38
41
'nps transpile' ,
39
- 'nps copy'
42
+ 'nps copy' ,
40
43
)
41
44
} ,
42
45
/**
@@ -49,7 +52,7 @@ module.exports = {
49
52
script : series (
50
53
'nps banner.test' ,
51
54
'nps test.unit.pretest' ,
52
- 'nps test.unit.run'
55
+ 'nps test.unit.run' ,
53
56
)
54
57
} ,
55
58
pretest : {
@@ -71,7 +74,7 @@ module.exports = {
71
74
'nps banner.test' ,
72
75
'nps test.e2e.pretest' ,
73
76
runInNewWindow ( series ( 'nps build' , 'nps start' ) ) ,
74
- 'nps test.e2e.run'
77
+ 'nps test.e2e.run' ,
75
78
)
76
79
} ,
77
80
pretest : {
@@ -82,7 +85,7 @@ module.exports = {
82
85
} ,
83
86
run : series (
84
87
`wait-on --timeout 120000 http-get://localhost:3000/api/info` ,
85
- './node_modules/.bin/cross-env NODE_ENV=test \"./node_modules/.bin/jest\" --testPathPattern=e2e -i'
88
+ './node_modules/.bin/cross-env NODE_ENV=test \"./node_modules/.bin/jest\" --testPathPattern=e2e -i' ,
86
89
) ,
87
90
}
88
91
} ,
@@ -103,7 +106,10 @@ module.exports = {
103
106
*/
104
107
clean : {
105
108
default : {
106
- script : series ( `nps banner.clean` , `nps clean.dist` )
109
+ script : series (
110
+ `nps banner.clean` ,
111
+ `nps clean.dist` ,
112
+ )
107
113
} ,
108
114
dist : {
109
115
script : `./node_modules/.bin/trash './dist'`
@@ -114,13 +120,22 @@ module.exports = {
114
120
*/
115
121
copy : {
116
122
default : {
117
- script : `nps copy.swagger && nps copy.public`
123
+ script : series (
124
+ `nps copy.swagger` ,
125
+ `nps copy.public` ,
126
+ )
118
127
} ,
119
128
swagger : {
120
- script : copy ( './src/api/swagger.json' , './dist' )
129
+ script : copy (
130
+ './src/api/swagger.json' ,
131
+ './dist' ,
132
+ )
121
133
} ,
122
134
public : {
123
- script : copy ( './src/public/*' , './dist' )
135
+ script : copy (
136
+ './src/public/*' ,
137
+ './dist' ,
138
+ )
124
139
}
125
140
} ,
126
141
/**
@@ -140,15 +155,27 @@ module.exports = {
140
155
db : {
141
156
migrate : {
142
157
default : {
143
- script : series ( 'nps banner.migrate' , '\"./node_modules/.bin/knex\" migrate:latest' )
158
+ script : series (
159
+ 'nps banner.migrate' ,
160
+ '\"./node_modules/.bin/knex\" migrate:latest' ,
161
+ )
144
162
} ,
145
- rollback : series ( 'nps banner.rollback' , '\"./node_modules/.bin/knex\" migrate:rollback' )
163
+ rollback : series (
164
+ 'nps banner.rollback' ,
165
+ '\"./node_modules/.bin/knex\" migrate:rollback' ,
166
+ )
146
167
} ,
147
168
seed : {
148
- script : series ( 'nps banner.seed' , '\"./node_modules/.bin/knex\" seed:run' )
169
+ script : series (
170
+ 'nps banner.seed' ,
171
+ '\"./node_modules/.bin/knex\" seed:run' ,
172
+ )
149
173
} ,
150
174
reset : {
151
- script : series ( 'nps banner.dbReset' , 'nps console db:reset' )
175
+ script : series (
176
+ 'nps banner.dbReset' ,
177
+ 'nps console db:reset' ,
178
+ )
152
179
}
153
180
} ,
154
181
/**
0 commit comments