mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
36 lines
769 B
TypeScript
36 lines
769 B
TypeScript
import * as gulp from 'gulp';
|
|
import watch = require('gulp-watch');
|
|
|
|
gulp.task('stream', () =>
|
|
gulp.src('css/**/*.css')
|
|
.pipe(watch('css/**/*.css'))
|
|
.pipe(gulp.dest('build'))
|
|
);
|
|
|
|
gulp.task('callback', (cb: () => void) =>
|
|
watch('css/**/*.css', () =>
|
|
gulp.src('css/**/*.css')
|
|
.pipe(watch('css/**/*.css'))
|
|
.on('end', cb)
|
|
)
|
|
);
|
|
|
|
gulp.task('build', () => {
|
|
var files = [
|
|
'app/**/*.ts',
|
|
'lib/**/*.ts',
|
|
'components/**/*.ts',
|
|
];
|
|
|
|
gulp.src(files, { base: '..' })
|
|
.pipe(watch(files, { base: '..' }));
|
|
});
|
|
|
|
gulp.task('use_file', () => {
|
|
watch("foo", file => {
|
|
const s: string = file.relative;
|
|
const e: "add" | "change" | "unlink" = file.event;
|
|
});
|
|
});
|
|
|