forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DefinitelyTyped#18063 from ikatyang/add-gulp-diff-…
…definitions feat(gulp-diff): initial commit
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import * as gulp from 'gulp'; | ||
import * as diff from 'gulp-diff'; | ||
|
||
gulp.task('task', () => { | ||
return gulp.src('src') | ||
.pipe(diff('dest')) | ||
.pipe(diff.reporter({fail: true})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Type definitions for gulp-diff 1.0 | ||
// Project: https://github.com/creativelive/gulp-diff | ||
// Definitions by: Ika <https://github.com/ikatyang> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
|
||
/// <reference types="node" /> | ||
|
||
import stream = require('stream'); | ||
|
||
/** | ||
* Gulp task to diff files in the stream against a destination. | ||
* @param dest target directory to diff against, defaults to diff against original source file | ||
*/ | ||
declare function gulp_diff(dest?: string): stream.Transform; | ||
|
||
declare namespace gulp_diff { | ||
const diff: typeof gulp_diff; | ||
|
||
function reporter(opts?: ReporterOptions): stream.Transform; | ||
interface ReporterOptions { | ||
/** | ||
* do not show diff information, defaults to `false` | ||
*/ | ||
quiet?: boolean; | ||
/** | ||
* emit an error on finding diffs, defaults to `false` | ||
*/ | ||
fail?: boolean; | ||
} | ||
} | ||
|
||
export = gulp_diff; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"lib": ["es6"], | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"strictNullChecks": true, | ||
"baseUrl": "../", | ||
"typeRoots": ["../"], | ||
"types": [], | ||
"noEmit": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"files": [ | ||
"index.d.ts", | ||
"gulp-diff-tests.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "dtslint/dt.json" | ||
} |