fix(gulp): fix build and run task defaults (#2484)
This commit is contained in:
parent
66c630df99
commit
08e7919094
14
gulpfile.js
14
gulpfile.js
|
@ -295,14 +295,16 @@ function runE2eTsTests(appDir, outputFile) {
|
|||
try {
|
||||
var exampleConfig = fs.readJsonSync(`${appDir}/${_exampleConfigFilename}`);
|
||||
} catch (e) {
|
||||
exampleConfig = {
|
||||
build: 'tsc',
|
||||
run: 'http-server:e2e'
|
||||
};
|
||||
exampleConfig = {};
|
||||
}
|
||||
|
||||
var appBuildSpawnInfo = spawnExt('npm', ['run', exampleConfig.build], { cwd: appDir });
|
||||
var appRunSpawnInfo = spawnExt('npm', ['run', exampleConfig.run, '--', '-s'], { cwd: appDir });
|
||||
var config = {
|
||||
build: exampleConfig.build || 'tsc',
|
||||
run: exampleConfig.run || 'http-server:e2e'
|
||||
};
|
||||
|
||||
var appBuildSpawnInfo = spawnExt('npm', ['run', config.build], { cwd: appDir });
|
||||
var appRunSpawnInfo = spawnExt('npm', ['run', config.run, '--', '-s'], { cwd: appDir });
|
||||
|
||||
return runProtractor(appBuildSpawnInfo.promise, appDir, appRunSpawnInfo, outputFile);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue