Skip to content

Commit 2b0d935

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 3f10c5a commit 2b0d935

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
@@ -427,12 +427,6 @@ export default Task.extend({
427427
Your package.json scripts must not contain a start script as it will be overwritten.
428428
`);
429429
}
430-
if (scripts['pree2e'] && scripts['prepree2e'] !== 'npm start' && !force) {
431-
throw new SilentError(oneLine`
432-
Your package.json scripts needs to not contain a prepree2e script as it will be
433-
overwritten.
434-
`);
435-
}
436430
if (scripts['pree2e'] && scripts['pree2e'] !== pree2eNpmScript && !force) {
437431
throw new SilentError(oneLine`
438432
Your package.json scripts must not contain a pree2e script as it will be
@@ -453,7 +447,6 @@ export default Task.extend({
453447
packageJson['scripts']['build'] = 'webpack';
454448
packageJson['scripts']['start'] = 'webpack-dev-server --port=4200';
455449
packageJson['scripts']['test'] = 'karma start ./karma.conf.js';
456-
packageJson['scripts']['prepree2e'] = 'npm start';
457450
packageJson['scripts']['pree2e'] = pree2eNpmScript;
458451
packageJson['scripts']['e2e'] = 'protractor ./protractor.conf.js';
459452

0 commit comments

Comments
 (0)