diff options
Diffstat (limited to 'tools/tasks/build.test.ts')
-rw-r--r-- | tools/tasks/build.test.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/tasks/build.test.ts b/tools/tasks/build.test.ts new file mode 100644 index 0000000..3e089cd --- /dev/null +++ b/tools/tasks/build.test.ts @@ -0,0 +1,21 @@ +import {join} from 'path'; +import {APP_SRC, TEST_DEST} from '../config'; +import {tsProjectFn} from '../utils'; + +export = function buildTest(gulp, plugins) { + return function () { + let tsProject = tsProjectFn(plugins); + let src = [ + join(APP_SRC, '**/*.ts'), + '!' + join(APP_SRC, 'bootstrap.ts') + ]; + + let result = gulp.src(src) + .pipe(plugins.plumber()) + .pipe(plugins.inlineNg2Template({ base: APP_SRC })) + .pipe(plugins.typescript(tsProject)); + + return result.js + .pipe(gulp.dest(TEST_DEST)); + }; +}; |