mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-05 16:10:11 +08:00
Add definitions for gulp-watch (https://github.com/floatdrop/gulp-watch)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/// <reference path="gulp-watch.d.ts" />
|
||||
/// <reference path="../gulp/gulp.d.ts" />
|
||||
|
||||
import gulp = require('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) =>
|
||||
watch('css/**/*.css', () =>
|
||||
gulp.src('css/**/*.css')
|
||||
.pipe(watch('css/**/*.css'))
|
||||
.on('end', cb)
|
||||
)
|
||||
);
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// Type definitions for gulp-watch v4.1.1
|
||||
// Project: https://github.com/floatdrop/gulp-watch
|
||||
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module 'gulp-watch' {
|
||||
interface IOptions {
|
||||
ignoreInitial?: boolean;
|
||||
events?: Array<string>;
|
||||
base?: string;
|
||||
name?: string;
|
||||
verbose?: boolean;
|
||||
readDelay?: number;
|
||||
}
|
||||
|
||||
interface IWatchStream extends NodeJS.ReadWriteStream {
|
||||
add(path: string | Array<string>): NodeJS.ReadWriteStream;
|
||||
unwatch(path: string | Array<string>): NodeJS.ReadWriteStream;
|
||||
close(): NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
function watch(glob: string, options?: IOptions, callback?: Function): IWatchStream;
|
||||
|
||||
export = watch;
|
||||
}
|
||||
Reference in New Issue
Block a user