Skip to content

Commit b95a793

Browse files
committed
Automatically recompile changed TypeScript
1 parent 6e2dea5 commit b95a793

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gulpfile.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
// noinspection JSUnusedGlobalSymbols
22

3-
import { dest } from 'gulp';
3+
import { dest, watch } from 'gulp';
44
import * as ts from 'gulp-typescript';
55

66
const project = ts.createProject('tsconfig.json');
77

88
export function compile(): NodeJS.ReadWriteStream {
99
return project.src().pipe(project()).pipe(dest('build'));
1010
}
11+
12+
export function monitor(): NodeJS.EventEmitter {
13+
return watch('src/**/*.ts', compile);
14+
}

0 commit comments

Comments
 (0)