Skip to content

Commit

Permalink
Merge pull request DefinitelyTyped#18063 from ikatyang/add-gulp-diff-…
Browse files Browse the repository at this point in the history
…definitions

feat(gulp-diff): initial commit
  • Loading branch information
RyanCavanaugh authored Jul 14, 2017
2 parents 53f1367 + 8bee269 commit 3987d6f
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
8 changes: 8 additions & 0 deletions types/gulp-diff/gulp-diff-tests.ts
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}));
});
32 changes: 32 additions & 0 deletions types/gulp-diff/index.d.ts
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;
18 changes: 18 additions & 0 deletions types/gulp-diff/tsconfig.json
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"
]
}
3 changes: 3 additions & 0 deletions types/gulp-diff/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}

0 comments on commit 3987d6f

Please sign in to comment.