From 41d8522538a944e01e3a31d9e3f8742d9323afa3 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 22 May 2017 11:42:05 +0100 Subject: [PATCH] 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 https://github.com/angular/angular-cli/issues/6171 --- packages/@angular/cli/tasks/eject.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/@angular/cli/tasks/eject.ts b/packages/@angular/cli/tasks/eject.ts index b04637701e83..900f6cf26638 100644 --- a/packages/@angular/cli/tasks/eject.ts +++ b/packages/@angular/cli/tasks/eject.ts @@ -424,12 +424,6 @@ export default Task.extend({ Your package.json scripts must not contain a start script as it will be overwritten. `); } - if (scripts['pree2e'] && scripts['prepree2e'] !== 'npm start' && !force) { - throw new SilentError(oneLine` - Your package.json scripts needs to not contain a prepree2e script as it will be - overwritten. - `); - } if (scripts['pree2e'] && scripts['pree2e'] !== pree2eNpmScript && !force) { throw new SilentError(oneLine` Your package.json scripts must not contain a pree2e script as it will be @@ -450,7 +444,6 @@ export default Task.extend({ packageJson['scripts']['build'] = 'webpack'; packageJson['scripts']['start'] = 'webpack-dev-server --port=4200'; packageJson['scripts']['test'] = 'karma start ./karma.conf.js'; - packageJson['scripts']['prepree2e'] = 'npm start'; packageJson['scripts']['pree2e'] = pree2eNpmScript; packageJson['scripts']['e2e'] = 'protractor ./protractor.conf.js';