mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
Add definitions and tests for gulp-flatten
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/// <reference path="./gulp-flatten.d.ts" />
|
||||
/// <reference path="../gulp/gulp.d.ts" />
|
||||
|
||||
import gulp = require("gulp");
|
||||
import flatten = require("gulp-flatten");
|
||||
|
||||
gulp.task("flatten:simple", () => {
|
||||
gulp.src(["files/**/*.txt"])
|
||||
.pipe(flatten())
|
||||
.pipe(gulp.dest("build"));
|
||||
});
|
||||
|
||||
gulp.task("flatten:newPath", () => {
|
||||
gulp.src(["files/**/*.txt"])
|
||||
.pipe(flatten({ newPath: "new/path" }))
|
||||
.pipe(gulp.dest("build"));
|
||||
});
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for gulp-flatten
|
||||
// Project: https://github.com/armed/gulp-flatten
|
||||
// Definitions by: Keita Kagurazaka <https://github.com/k-kagurazaka>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "gulp-flatten" {
|
||||
|
||||
interface IOptions {
|
||||
newPath: string;
|
||||
}
|
||||
|
||||
function flatten(options?: IOptions): NodeJS.ReadWriteStream;
|
||||
|
||||
export = flatten;
|
||||
}
|
||||
Reference in New Issue
Block a user