mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
fix(build): update angular build process
This commit is contained in:
@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -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`));
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user