From 4935b24b8586f6eb8541520f86ce990cf129a18b Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 1 Mar 2017 20:58:17 +0100 Subject: [PATCH] build: make app tasks optional (#3361) --- tools/gulp/task_helpers.ts | 3 ++- tools/gulp/tasks/e2e.ts | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/gulp/task_helpers.ts b/tools/gulp/task_helpers.ts index 68f9f8e24b7..3f32afed07d 100644 --- a/tools/gulp/task_helpers.ts +++ b/tools/gulp/task_helpers.ts @@ -135,7 +135,8 @@ export function cleanTask(glob: string) { /** Build an task that depends on all application build tasks. */ export function buildAppTask(appName: string) { const buildTasks = ['vendor', 'ts', 'scss', 'assets'] - .map(taskName => `:build:${appName}:${taskName}`); + .map(taskName => `:build:${appName}:${taskName}`) + .filter(taskName => gulp.hasTask(taskName)); return (done: () => void) => { gulpRunSequence( diff --git a/tools/gulp/tasks/e2e.ts b/tools/gulp/tasks/e2e.ts index 46ee68e8415..ccc1d0f4901 100644 --- a/tools/gulp/tasks/e2e.ts +++ b/tools/gulp/tasks/e2e.ts @@ -25,9 +25,6 @@ task(':build:e2eapp:vendor', vendorTask()); /** Builds e2e app ts to js. */ task(':build:e2eapp:ts', tsBuildTask(appDir)); -/** No-op (needed by buildAppTask). */ -task(':build:e2eapp:scss', sassBuildTask(outDir, appDir)); - /** Copies e2e app assets (html, css) to build output. */ task(':build:e2eapp:assets', copyTask(appDir, outDir));