File tree 2 files changed +10
-0
lines changed
packages/@angular/cli/tasks
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export const E2eTask = Task.extend({
43
43
const webdriverUpdate = requireProjectModule ( projectRoot ,
44
44
'protractor/node_modules/webdriver-manager/built/lib/cmds/update' ) ;
45
45
// run `webdriver-manager update --standalone false --gecko false --quiet`
46
+ // if you change this, update the command comment in prev line, and in `eject` task
46
47
promise = promise . then ( ( ) => webdriverUpdate . program . run ( {
47
48
standalone : false ,
48
49
gecko : false ,
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ const ProgressPlugin = require('webpack/lib/ProgressPlugin');
31
31
export const pluginArgs = Symbol ( 'plugin-args' ) ;
32
32
export const postcssArgs = Symbol ( 'postcss-args' ) ;
33
33
34
+ const pree2eNpmScript = `webdriver-manager update --standalone false --gecko false --quiet` ;
35
+
34
36
35
37
class JsonWebpackSerializer {
36
38
public imports : { [ name : string ] : string [ ] } = { } ;
@@ -434,6 +436,12 @@ export default Task.extend({
434
436
Your package.json scripts needs to not contain a start script as it will be overwritten.
435
437
` ) ;
436
438
}
439
+ if ( scripts [ 'pree2e' ] && scripts [ 'pree2e' ] !== pree2eNpmScript && ! force ) {
440
+ throw new SilentError ( oneLine `
441
+ Your package.json scripts needs to not contain a pree2e script as it will be
442
+ overwritten.
443
+ ` ) ;
444
+ }
437
445
if ( scripts [ 'e2e' ] && scripts [ 'e2e' ] !== 'ng e2e' && ! force ) {
438
446
throw new SilentError ( oneLine `
439
447
Your package.json scripts needs to not contain a e2e script as it will be overwritten.
@@ -448,6 +456,7 @@ export default Task.extend({
448
456
packageJson [ 'scripts' ] [ 'build' ] = 'webpack' ;
449
457
packageJson [ 'scripts' ] [ 'start' ] = 'webpack-dev-server' ;
450
458
packageJson [ 'scripts' ] [ 'test' ] = 'karma start ./karma.conf.js' ;
459
+ packageJson [ 'scripts' ] [ 'pree2e' ] = pree2eNpmScript ;
451
460
packageJson [ 'scripts' ] [ 'e2e' ] = 'protractor ./protractor.conf.js' ;
452
461
453
462
// Add new dependencies based on our dependencies.
You can’t perform that action at this time.
0 commit comments