Add definitions and tests for gulp-flatten

This commit is contained in:
Keita Kagurazaka
2015-03-04 05:34:06 +00:00
parent 4837e53d25
commit 8c5f9860a4
2 changed files with 34 additions and 0 deletions
+17
View File
@@ -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"));
});
+17
View File
@@ -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;
}