Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 08e7919

Browse files
authored
fix(gulp): fix build and run task defaults (#2484)
1 parent 66c630d commit 08e7919

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

gulpfile.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,16 @@ function runE2eTsTests(appDir, outputFile) {
295295
try {
296296
var exampleConfig = fs.readJsonSync(`${appDir}/${_exampleConfigFilename}`);
297297
} catch (e) {
298-
exampleConfig = {
299-
build: 'tsc',
300-
run: 'http-server:e2e'
301-
};
298+
exampleConfig = {};
302299
}
300+
301+
var config = {
302+
build: exampleConfig.build || 'tsc',
303+
run: exampleConfig.run || 'http-server:e2e'
304+
};
303305

304-
var appBuildSpawnInfo = spawnExt('npm', ['run', exampleConfig.build], { cwd: appDir });
305-
var appRunSpawnInfo = spawnExt('npm', ['run', exampleConfig.run, '--', '-s'], { cwd: appDir });
306+
var appBuildSpawnInfo = spawnExt('npm', ['run', config.build], { cwd: appDir });
307+
var appRunSpawnInfo = spawnExt('npm', ['run', config.run, '--', '-s'], { cwd: appDir });
306308

307309
return runProtractor(appBuildSpawnInfo.promise, appDir, appRunSpawnInfo, outputFile);
308310
}

0 commit comments

Comments
 (0)