fix(build): update angular build process

This commit is contained in:
Adam Bradley
2017-04-26 15:26:25 -05:00
parent cdffc62615
commit dfdcf2003d
26 changed files with 484 additions and 295 deletions

View File

@ -1,15 +1,26 @@
import { DIST_BUILD_ROOT, PROJECT_ROOT } from '../constants';
import { SRC_ROOT, DIST_BUILD_ROOT, PROJECT_ROOT } from '../constants';
import { task } from 'gulp';
import { accessSync } from 'fs';
import { join } from 'path';
task('core', (done) => {
buildAngularBinding(false, done);
});
task('core.watch', (done) => {
buildAngularBinding(true, done);
});
function buildAngularBinding(skipBuildingCore: boolean, done: Function) {
const cwd = join(PROJECT_ROOT, '../ionic-core');
const args = [
'run',
'build.angular',
DIST_BUILD_ROOT
SRC_ROOT,
DIST_BUILD_ROOT,
skipBuildingCore ? 'skip-core' : 'do-not-skip-core'
];
try {
@ -33,4 +44,4 @@ task('core', (done) => {
ls.on('close', (code) => {
done();
});
});
}

View File

@ -6,7 +6,7 @@ import { task } from 'gulp';
import { ES_2015, PROJECT_ROOT } from '../constants';
import { createTempTsConfig, getFolderInfo, runAppScriptsServe } from '../util';
task('e2e.watch', ['e2e.prepare'], (done: Function) => {
task('e2e.watch', ['e2e.prepare', 'core.watch'], (done: Function) => {
const folderInfo = getFolderInfo();
if (!folderInfo || !folderInfo.componentName || !folderInfo.componentTest) {
done(new Error(`Usage: gulp e2e.watch --folder nav/basic`));

View File

@ -15,7 +15,7 @@ import { createTempTsConfig, createTimestamp, getFolderInfo, readFileAsync, runA
import * as pAll from 'p-all';
task('e2e.prepare', (done: Function) => {
runSequence('e2e.clean', 'core', 'e2e.polyfill', 'e2e.prepareSass', (err: any) => done(err));
runSequence('e2e.clean', 'e2e.polyfill', 'e2e.prepareSass', (err: any) => done(err));
});
task('e2e.prepareSass', (done: Function) => {
@ -24,7 +24,7 @@ task('e2e.prepareSass', (done: Function) => {
done();
});
task('e2e.prod', ['e2e.prepare'], (done: Function) => {
task('e2e.prod', ['e2e.prepare', 'core'], (done: Function) => {
// okay, first find out all of the e2e tests to run by finding all of the 'main.ts' files
filterE2eTestfiles().then((filePaths: string[]) => {
if (filePaths && filePaths.length > 0) {