From 5310ac7d8eb1838a6297117bc7f9fca70291f46a Mon Sep 17 00:00:00 2001 From: Alex Tatiyants Date: Sun, 3 Jan 2016 17:17:48 -0800 Subject: initial commit --- tools/tasks/build.js.dev.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tools/tasks/build.js.dev.ts (limited to 'tools/tasks/build.js.dev.ts') diff --git a/tools/tasks/build.js.dev.ts b/tools/tasks/build.js.dev.ts new file mode 100644 index 0000000..dfe9539 --- /dev/null +++ b/tools/tasks/build.js.dev.ts @@ -0,0 +1,25 @@ +import {join} from 'path'; +import {APP_SRC, APP_DEST} from '../config'; +import {templateLocals, tsProjectFn} from '../utils'; + +export = function buildJSDev(gulp, plugins) { + let tsProject = tsProjectFn(plugins); + return function () { + let src = [ + join(APP_SRC, '**/*.ts'), + '!' + join(APP_SRC, '**/*_spec.ts') + ]; + + let result = gulp.src(src) + .pipe(plugins.plumber()) + // Won't be required for non-production build after the change + .pipe(plugins.inlineNg2Template({ base: APP_SRC })) + .pipe(plugins.sourcemaps.init()) + .pipe(plugins.typescript(tsProject)); + + return result.js + .pipe(plugins.sourcemaps.write()) + .pipe(plugins.template(templateLocals())) + .pipe(gulp.dest(APP_DEST)); + }; +}; -- cgit v1.2.3