@startupjs/cli 0.55.9 → 0.55.10
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 +35 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -148,6 +148,18 @@ SCRIPTS_ORIG.postinstall = () => oneLine(`
|
|
|
148
148
|
${SCRIPTS_ORIG.patchPackage()}
|
|
149
149
|
`)
|
|
150
150
|
|
|
151
|
+
SCRIPTS_ORIG.testE2E = ({ inspect } = {}) => {
|
|
152
|
+
return oneLine(`
|
|
153
|
+
startupjs build --async && npx concurrently "startupjs start-production" "sleep 15s && npx playwright test $@" --kill-others --success first
|
|
154
|
+
`)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
SCRIPTS_ORIG.codegenTestE2E = ({ inspect } = {}) => {
|
|
158
|
+
return oneLine(`
|
|
159
|
+
startupjs build --async && npx concurrently "startupjs start-production" "npx playwright codegen $@"
|
|
160
|
+
`)
|
|
161
|
+
}
|
|
162
|
+
|
|
151
163
|
const SCRIPTS = {
|
|
152
164
|
start: 'startupjs start',
|
|
153
165
|
metro: 'react-native start --reset-cache',
|
|
@@ -162,7 +174,9 @@ const SCRIPTS = {
|
|
|
162
174
|
ios: 'react-native run-ios',
|
|
163
175
|
'ios-release': 'react-native run-ios --configuration Release',
|
|
164
176
|
build: 'startupjs build --async',
|
|
165
|
-
'start-production': 'startupjs start-production'
|
|
177
|
+
'start-production': 'startupjs start-production',
|
|
178
|
+
'test-e2e': 'startupjs test-e2e',
|
|
179
|
+
'codegen-test-e2e': 'startupjs codegen-test-e2e'
|
|
166
180
|
}
|
|
167
181
|
|
|
168
182
|
const DEFAULT_TEMPLATE = 'ui'
|
|
@@ -356,6 +370,26 @@ commander
|
|
|
356
370
|
)
|
|
357
371
|
})
|
|
358
372
|
|
|
373
|
+
commander
|
|
374
|
+
.command('test-e2e')
|
|
375
|
+
.description('Run e2e tests')
|
|
376
|
+
.action(async (options) => {
|
|
377
|
+
await execa.command(
|
|
378
|
+
SCRIPTS_ORIG.testE2E(options),
|
|
379
|
+
{ stdio: 'inherit', shell: true }
|
|
380
|
+
)
|
|
381
|
+
})
|
|
382
|
+
|
|
383
|
+
commander
|
|
384
|
+
.command('codegen-test-e2e')
|
|
385
|
+
.description('Run codegen for e2e tests')
|
|
386
|
+
.action(async (options) => {
|
|
387
|
+
await execa.command(
|
|
388
|
+
SCRIPTS_ORIG.codegenTestE2E(options),
|
|
389
|
+
{ stdio: 'inherit', shell: true }
|
|
390
|
+
)
|
|
391
|
+
})
|
|
392
|
+
|
|
359
393
|
commander
|
|
360
394
|
.command('web')
|
|
361
395
|
.description('Compile (with webpack) and run web')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs/cli",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.10",
|
|
4
4
|
"description": "start, watch and build startupjs project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"webpack-cli": "^4.9.1",
|
|
25
25
|
"webpack-dev-server": "^4.4.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "57d9888fca3409050042fa1c3ea9a5783e090275"
|
|
28
28
|
}
|