mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add definitions and tests for gulp-concat
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/// <reference path="./gulp-concat.d.ts" />
|
||||
/// <reference path="../gulp/gulp.d.ts" />
|
||||
|
||||
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"));
|
||||
});
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
// Type definitions for gulp-concat
|
||||
// Project: http://github.com/wearefractal/gulp-concat
|
||||
// Definitions by: Keita Kagurazaka <https://github.com/k-kagurazaka>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user