diff --git a/gulp-concat/gulp-concat-tests.ts b/gulp-concat/gulp-concat-tests.ts new file mode 100644 index 000000000..a2a475b97 --- /dev/null +++ b/gulp-concat/gulp-concat-tests.ts @@ -0,0 +1,23 @@ +/// +/// + +import gulp = require("gulp"); +import concat = require("gulp-concat"); + +gulp.task("concat:simple", () => { + gulp.src(["file*.txt"]) + .pipe(concat("file.txt")) + .pipe(gulp.dest("build")); +}); + +gulp.task("concat:newLine", () => { + gulp.src(["file*.txt"]) + .pipe(concat("file.txt", { newLine: ";" })) + .pipe(gulp.dest("build")); +}); + +gulp.task("concat:vinyl", () => { + gulp.src(["file*.txt"]) + .pipe(concat({ path: "file.txt", stat: { mode: 0666 } })) + .pipe(gulp.dest("build")); +}); diff --git a/gulp-concat/gulp-concat.d.ts b/gulp-concat/gulp-concat.d.ts new file mode 100644 index 000000000..cad21c303 --- /dev/null +++ b/gulp-concat/gulp-concat.d.ts @@ -0,0 +1,42 @@ +// Type definitions for gulp-concat +// Project: http://github.com/wearefractal/gulp-concat +// Definitions by: Keita Kagurazaka +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "gulp-concat" { + + interface IOptions { + newLine: string; + } + + interface IFsStats { + dev?: number; + ino?: number; + mode?: number; + nlink?: number; + uid?: number; + gid?: number; + rdev?: number; + size?: number; + blksize?: number; + blocks?: number; + atime?: Date; + mtime?: Date; + ctime?: Date; + } + + interface IVinylOptions { + cwd?: string; + base?: string; + path?: string; + stat?: IFsStats; + contents?: NodeJS.ReadableStream | Buffer; + } + + function concat(filename: string, options?: IOptions): NodeJS.ReadWriteStream; + function concat(options: IVinylOptions): NodeJS.ReadWriteStream; + + export = concat; +}