mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add definitions for gulp-useref (https://github.com/jonkemp/gulp-useref)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/// <reference path="gulp-useref.d.ts" />
|
||||
/// <reference path="../gulp/gulp.d.ts" />
|
||||
|
||||
import gulp = require('gulp');
|
||||
import useref = require('gulp-useref');
|
||||
|
||||
gulp.task('default', () => {
|
||||
var assets = useref.assets();
|
||||
|
||||
return gulp.src('app/*.html')
|
||||
.pipe(assets)
|
||||
.pipe(assets.restore())
|
||||
.pipe(useref())
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for gulp-useref v1.2.0
|
||||
// Project: https://github.com/jonkemp/gulp-useref
|
||||
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module 'gulp-useref' {
|
||||
interface IAssetsOptions {
|
||||
searchPath?: string | string[];
|
||||
noconcat?: boolean;
|
||||
}
|
||||
|
||||
interface IAssetsStream extends NodeJS.ReadWriteStream {
|
||||
restore(): NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
interface IUseref {
|
||||
(options?: any): NodeJS.ReadWriteStream;
|
||||
assets(options?: IAssetsOptions): IAssetsStream;
|
||||
}
|
||||
|
||||
var useref: IUseref;
|
||||
export = useref;
|
||||
}
|
||||
Reference in New Issue
Block a user