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

fix(gulp): fix build and run task defaults #2484

Merged
merged 1 commit into from
Sep 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 config = {
build: exampleConfig.build || 'tsc',
run: exampleConfig.run || 'http-server:e2e'
};

var appBuildSpawnInfo = spawnExt('npm', ['run', exampleConfig.build], { cwd: appDir });
var appRunSpawnInfo = spawnExt('npm', ['run', exampleConfig.run, '--', '-s'], { cwd: appDir });
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);
}
Expand Down