Add definitions and tests for gulp-flatten

This commit is contained in:
Keita Kagurazaka committed 2015-03-04 05:34:06 +00:00
1 parent 4837e53d25
commit 8c5f9860a4
2 files changed
+34

No files matched your search

+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;
}