Skip to content

Commit 41d8522

Browse files
filipesilvaBrocco
authored andcommitted
fix(@angular/cli): remove broken script after eject
`prepree2e` doesn't run because it's a lifecycle script for a lifecycle script, but even if it did it would not work because there is nothing coordinating the serve and e2e processes. Users must manually initialize the server prior to running e2e tests after ejecting. Related to #6171
1 parent ce54caf commit 41d8522

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

packages/@angular/cli/tasks/eject.ts

-7
Original file line numberDiff line numberDiff line change
@@ -424,12 +424,6 @@ export default Task.extend({
424424
Your package.json scripts must not contain a start script as it will be overwritten.
425425
`);
426426
}
427-
if (scripts['pree2e'] && scripts['prepree2e'] !== 'npm start' && !force) {
428-
throw new SilentError(oneLine`
429-
Your package.json scripts needs to not contain a prepree2e script as it will be
430-
overwritten.
431-
`);
432-
}
433427
if (scripts['pree2e'] && scripts['pree2e'] !== pree2eNpmScript && !force) {
434428
throw new SilentError(oneLine`
435429
Your package.json scripts must not contain a pree2e script as it will be
@@ -450,7 +444,6 @@ export default Task.extend({
450444
packageJson['scripts']['build'] = 'webpack';
451445
packageJson['scripts']['start'] = 'webpack-dev-server --port=4200';
452446
packageJson['scripts']['test'] = 'karma start ./karma.conf.js';
453-
packageJson['scripts']['prepree2e'] = 'npm start';
454447
packageJson['scripts']['pree2e'] = pree2eNpmScript;
455448
packageJson['scripts']['e2e'] = 'protractor ./protractor.conf.js';
456449

0 commit comments

Comments
 (0)