blob: 54ed21a20cc5ca8fd4a2e9a31abb6c0fd0a8e79c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import {join} from 'path';
import {APP_SRC, TMP_DIR} from '../config';
import {templateLocals, tsProjectFn} from '../utils';
export = function buildJSDev(gulp, plugins) {
return function () {
let tsProject = tsProjectFn(plugins);
let src = [
join(APP_SRC, '**/*.ts'),
'!' + join(APP_SRC, '**/*_spec.ts')
];
let result = gulp.src(src)
.pipe(plugins.plumber())
.pipe(plugins.inlineNg2Template({ base: TMP_DIR }))
.pipe(plugins.typescript(tsProject));
return result.js
.pipe(plugins.template(templateLocals()))
.pipe(gulp.dest(TMP_DIR));
};
};
|