File tree 1 file changed +8
-1
lines changed
packages/@angular/cli/tasks
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,12 @@ export default Task.extend({
439
439
Your package.json scripts needs to not contain a start script as it will be overwritten.
440
440
` ) ;
441
441
}
442
+ if ( scripts [ 'pree2e' ] && scripts [ 'prepree2e' ] !== 'npm start' && ! force ) {
443
+ throw new SilentError ( oneLine `
444
+ Your package.json scripts needs to not contain a prepree2e script as it will be
445
+ overwritten.
446
+ ` ) ;
447
+ }
442
448
if ( scripts [ 'pree2e' ] && scripts [ 'pree2e' ] !== pree2eNpmScript && ! force ) {
443
449
throw new SilentError ( oneLine `
444
450
Your package.json scripts needs to not contain a pree2e script as it will be
@@ -457,8 +463,9 @@ export default Task.extend({
457
463
}
458
464
459
465
packageJson [ 'scripts' ] [ 'build' ] = 'webpack' ;
460
- packageJson [ 'scripts' ] [ 'start' ] = 'webpack-dev-server' ;
466
+ packageJson [ 'scripts' ] [ 'start' ] = 'webpack-dev-server --port=4200 ' ;
461
467
packageJson [ 'scripts' ] [ 'test' ] = 'karma start ./karma.conf.js' ;
468
+ packageJson [ 'scripts' ] [ 'prepree2e' ] = 'npm start' ;
462
469
packageJson [ 'scripts' ] [ 'pree2e' ] = pree2eNpmScript ;
463
470
packageJson [ 'scripts' ] [ 'e2e' ] = 'protractor ./protractor.conf.js' ;
464
471
You can’t perform that action at this time.
0 commit comments