forked from kije/webpack-fallback-directory-resolver-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
28 lines (20 loc) · 651 Bytes
/
gulpfile.js
File metadata and controls
28 lines (20 loc) · 651 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const gulp = require("gulp"),
merge = require('merge2');
gulp.task('build', () => {
"use strict";
const ts = require('gulp-typescript');
const tsProject = ts.createProject('tsconfig.json');
const tsResult = tsProject.src().pipe(tsProject(ts.reporter.fullReporter(true)));
return merge([
tsResult.dts.pipe(gulp.dest('definitions')),
tsResult.js.pipe(gulp.dest('dist'))
]);
});
gulp.task('watch', () => {
"use strict";
const watch = require('gulp-watch');
return watch('src/**/*.ts', { ignoreInitial: false }, () => {
gulp.run('build');
});
});
gulp.task('default', ['watch']);