@startupjs/cli 0.44.16 → 0.45.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +16 -16
- package/package.json +4 -2
package/index.js
CHANGED
|
@@ -86,13 +86,13 @@ SCRIPTS_ORIG.web = ({ reset, vite, webpack } = {}) => {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
SCRIPTS_ORIG.webVite = ({ reset } = {}) => oneLine(`
|
|
89
|
-
${reset ? '
|
|
90
|
-
VITE_WEB=1
|
|
89
|
+
${reset ? 'rimraf node_modules/.vite_opt_cache &&' : ''}
|
|
90
|
+
cross-env VITE_WEB=1
|
|
91
91
|
vite
|
|
92
92
|
`)
|
|
93
93
|
|
|
94
94
|
SCRIPTS_ORIG.webWebpack = oneLine(`
|
|
95
|
-
WEBPACK_DEV=1
|
|
95
|
+
cross-env WEBPACK_DEV=1
|
|
96
96
|
webpack-dev-server --config webpack.web.config.cjs
|
|
97
97
|
`)
|
|
98
98
|
|
|
@@ -148,12 +148,12 @@ SCRIPTS_ORIG.testBuild = appName => oneLine(`
|
|
|
148
148
|
`)
|
|
149
149
|
|
|
150
150
|
SCRIPTS_ORIG.testIos = (appName, artifacts, updateScreenshot) => oneLine(`
|
|
151
|
-
${updateScreenshot ? `
|
|
151
|
+
${updateScreenshot ? `rimraf \`find ${ROOT_PATH} -name "__image_snapshots__" -type d\` &&` : ''}
|
|
152
152
|
concurrently
|
|
153
153
|
-s first -k -n "S,T"
|
|
154
154
|
-c white,cyan.bgBlue
|
|
155
155
|
"mongo ${appName}_test --eval 'db.dropDatabase();'
|
|
156
|
-
&& ASYNC=1 startupjs build
|
|
156
|
+
&& cross-env ASYNC=1 startupjs build
|
|
157
157
|
&& PORT=3001 MONGO_URL=mongodb://localhost:27017/${appName}_test startupjs start-production"
|
|
158
158
|
"${SCRIPTS_ORIG.testJsBundle(appName)}
|
|
159
159
|
&& wait-on http://localhost:3001
|
|
@@ -164,7 +164,7 @@ SCRIPTS_ORIG.testIos = (appName, artifacts, updateScreenshot) => oneLine(`
|
|
|
164
164
|
|
|
165
165
|
SCRIPTS_ORIG.testJsBundle = appName => oneLine(`
|
|
166
166
|
mkdir -p ios/build/Build/Products/Release-iphonesimulator/${appName}.app/
|
|
167
|
-
&& APP_ENV=detox react-native bundle
|
|
167
|
+
&& cross-env APP_ENV=detox react-native bundle
|
|
168
168
|
--entry-file="index.js"
|
|
169
169
|
--bundle-output="./ios/build/Build/Products/Release-iphonesimulator/${appName}.app/main.jsbundle"
|
|
170
170
|
--reset-cache --dev=false
|
|
@@ -181,7 +181,7 @@ SCRIPTS_ORIG.server = ({ inspect, vite, webpack, pure } = {}) => {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
SCRIPTS_ORIG.serverPure = ({ inspect, vite } = {}) => oneLine(`
|
|
184
|
-
${vite ? 'VITE=1' : ''}
|
|
184
|
+
${vite ? 'cross-env VITE=1' : ''}
|
|
185
185
|
nodemon
|
|
186
186
|
--experimental-specifier-resolution=node
|
|
187
187
|
${inspect ? '--inspect' : ''}
|
|
@@ -207,14 +207,14 @@ SCRIPTS_ORIG.serverWebpack = (options) => oneLine(`
|
|
|
207
207
|
`)
|
|
208
208
|
|
|
209
209
|
SCRIPTS_ORIG.serverWebpackBuild = oneLine(`
|
|
210
|
-
WEBPACK_DEV=1
|
|
210
|
+
cross-env WEBPACK_DEV=1
|
|
211
211
|
webpack --watch --config webpack.server.config.cjs
|
|
212
212
|
`)
|
|
213
213
|
|
|
214
214
|
SCRIPTS_ORIG.serverWebpackRun = ({ inspect, vite }) => oneLine(`
|
|
215
|
-
|
|
215
|
+
rimraf ./build/server.dev.cjs &&
|
|
216
216
|
just-wait -t 1000 --pattern ./build/server.dev.cjs &&
|
|
217
|
-
${vite ? 'VITE=1' : ''}
|
|
217
|
+
${vite ? 'cross-env VITE=1' : ''}
|
|
218
218
|
nodemon
|
|
219
219
|
--experimental-specifier-resolution=node
|
|
220
220
|
${inspect ? '--inspect' : ''}
|
|
@@ -236,7 +236,7 @@ SCRIPTS_ORIG.start = (options = {}) => {
|
|
|
236
236
|
|
|
237
237
|
SCRIPTS_ORIG.startPure = (...args) => oneLine(`
|
|
238
238
|
concurrently
|
|
239
|
-
-s first -k -n 'Server,
|
|
239
|
+
-s first -k -n 'Server,Web'
|
|
240
240
|
-c cyan.bgBlue,gray
|
|
241
241
|
"${SCRIPTS_ORIG.server(...args)}"
|
|
242
242
|
"${SCRIPTS_ORIG.web(...args)}"
|
|
@@ -245,7 +245,7 @@ SCRIPTS_ORIG.startPure = (...args) => oneLine(`
|
|
|
245
245
|
SCRIPTS_ORIG.startWebpack = (options) => oneLine(`
|
|
246
246
|
concurrently
|
|
247
247
|
-p "{name}:"
|
|
248
|
-
-s first -k -n 'Server,
|
|
248
|
+
-s first -k -n 'Server,ServerBuild,Web'
|
|
249
249
|
-c cyan.bgBlue.bold,gray,gray
|
|
250
250
|
"${SCRIPTS_ORIG.serverWebpackRun(options)}"
|
|
251
251
|
"${SCRIPTS_ORIG.serverWebpackBuild}"
|
|
@@ -255,9 +255,9 @@ SCRIPTS_ORIG.startWebpack = (options) => oneLine(`
|
|
|
255
255
|
// Production build
|
|
256
256
|
|
|
257
257
|
SCRIPTS_ORIG.build = ({ async, pure } = {}) => oneLine(`
|
|
258
|
-
|
|
258
|
+
rimraf ./build &&
|
|
259
259
|
${pure ? '' : 'webpack --config webpack.server.config.cjs &&'}
|
|
260
|
-
${async ? 'ASYNC=1' : ''}
|
|
260
|
+
${async ? 'cross-env ASYNC=1' : ''}
|
|
261
261
|
webpack --config webpack.web.config.cjs
|
|
262
262
|
`)
|
|
263
263
|
|
|
@@ -270,14 +270,14 @@ SCRIPTS_ORIG.startProduction = ({ pure }) => {
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
SCRIPTS_ORIG.startProductionPure = oneLine(`
|
|
273
|
-
NODE_ENV=production
|
|
273
|
+
cross-env NODE_ENV=production
|
|
274
274
|
node
|
|
275
275
|
--experimental-specifier-resolution=node
|
|
276
276
|
server.js
|
|
277
277
|
`)
|
|
278
278
|
|
|
279
279
|
SCRIPTS_ORIG.startProductionWebpack = oneLine(`
|
|
280
|
-
NODE_ENV=production
|
|
280
|
+
cross-env NODE_ENV=production
|
|
281
281
|
node
|
|
282
282
|
--experimental-specifier-resolution=node
|
|
283
283
|
-r source-map-support/register
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.4",
|
|
4
4
|
"description": "start, watch and build startupjs project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {},
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"commander": "^3.0.1",
|
|
13
13
|
"concurrently": "^6.4.0",
|
|
14
|
+
"cross-env": "^7.0.3",
|
|
14
15
|
"execa": "^2.0.4",
|
|
15
16
|
"fonteditor-core": "2.1.3",
|
|
16
17
|
"glob": "^7.1.6",
|
|
@@ -18,11 +19,12 @@
|
|
|
18
19
|
"lodash": "^4.17.20",
|
|
19
20
|
"nodemon": "^1.19.2",
|
|
20
21
|
"react-native-asset": "2.0.1",
|
|
22
|
+
"rimraf": "^3.0.2",
|
|
21
23
|
"source-map-support": "^0.5.19",
|
|
22
24
|
"wait-on": "^5.2.1",
|
|
23
25
|
"webpack": "^5.60.0",
|
|
24
26
|
"webpack-cli": "^4.9.1",
|
|
25
27
|
"webpack-dev-server": "^4.4.0"
|
|
26
28
|
},
|
|
27
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "c1bc63f5c13364e2b4cd09c95ea4273bf2f56207"
|
|
28
30
|
}
|