mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Add type definitions for gulp-install
This commit is contained in:
25
gulp-install/gulp-install-tests.ts
Normal file
25
gulp-install/gulp-install-tests.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/// <reference path="gulp-install.d.ts" />
|
||||
/// <reference path="../gulp/gulp.d.ts" />
|
||||
|
||||
import * as gulp from 'gulp';
|
||||
import * as install from 'gulp-install';
|
||||
|
||||
// Examples taken from https://www.npmjs.com/package/gulp-install
|
||||
|
||||
// Usage in a gulp stream
|
||||
gulp.src('src')
|
||||
.pipe(install());
|
||||
|
||||
// Options
|
||||
install({
|
||||
production: true,
|
||||
ignoreScripts: true,
|
||||
noOptional: true,
|
||||
allowRoot: true,
|
||||
args: ['one', 'two', 'three']
|
||||
});
|
||||
|
||||
// Options: args only as a string
|
||||
install({
|
||||
args: 'one'
|
||||
});
|
||||
22
gulp-install/gulp-install.d.ts
vendored
Normal file
22
gulp-install/gulp-install.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// Type definitions for gulp-install v0.6.0
|
||||
// Project: https://www.npmjs.com/package/gulp-install
|
||||
// Definitions by: Peter Juras <https://github.com/peterjuras>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "gulp-install" {
|
||||
interface Options {
|
||||
production?: boolean;
|
||||
ignoreScripts?: boolean;
|
||||
noOptional?: boolean;
|
||||
allowRoot?: boolean;
|
||||
args?: string | string[];
|
||||
}
|
||||
|
||||
interface Install {
|
||||
(options?: Options) : NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
const install : Install;
|
||||
export = install;
|
||||
}
|
||||
Reference in New Issue
Block a user