forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp-help.d.ts
119 lines (108 loc) · 5.09 KB
/
gulp-help.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// Type definitions for gulp-help
// Project: https://github.com/chmontgomery/gulp-help
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../bluebird/bluebird.d.ts" />
/// <reference path="../node/node.d.ts" />
/// <reference path="../gulp/gulp.d.ts" />
/// <reference path="../orchestrator/orchestrator.d.ts" />
declare module "gulp-help" {
import Orchestrator = require('orchestrator');
import gulp = require('gulp');
type HelpOption = string|boolean;
namespace gulpHelp {
interface TaskMethod {
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param help Custom help message as a string. If you want to hide the task from the help menu, supply false
* @param deps an array of tasks to be executed and completed before your task will run.
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
* @param option task options
*/
(name: string, help: HelpOption, deps: string[], fn?: gulp.TaskCallback, option?: TaskOptions): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param help Custom help message as a string. If you want to hide the task from the help menu, supply false
* @param deps an array of tasks to be executed and completed before your task will run.
*/
(name: string, help: HelpOption, deps: string[]): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param help Custom help message as a string. If you want to hide the task from the help menu, supply false
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
* @param option task options
*/
(name: string, help: HelpOption, fn?: gulp.TaskCallback, option?: TaskOptions): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param help Custom help message as a string. If you want to hide the task from the help menu, supply false
*/
(name: string, help: HelpOption): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param deps an array of tasks to be executed and completed before your task will run.
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
* @param option task options
*/
(name: string, deps: string[], fn?: gulp.TaskCallback, option?: TaskOptions): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
* @param option task options
*/
(name: string, fn?: gulp.TaskCallback, option?: TaskOptions): any;
}
interface GulpHelp extends Orchestrator {
task: TaskMethod;
src: gulp.SrcMethod;
dest: gulp.DestMethod;
watch: gulp.WatchMethod;
}
interface TaskOptions {
/**
* List of aliases for this task
*/
aliases?: string[];
/**
* Object documenting options which can be passed to your task
*/
options?: { [key: string]: string };
}
interface GulpHelpOptions {
/**
* Modifies the default help message
*/
description?: string;
/**
* Adds aliases to the default help task
*/
aliases?: string[];
/**
* Hide all tasks with no help message defined. Useful when including 3rd party tasks
*/
hideEmpty?: boolean;
/**
* Hide all task dependencies
*/
hideDepsMessage?: boolean;
/**
* A function to run after the default help task runs
*/
afterPrintCallback?: Function;
}
}
function gulpHelp(gulp: gulp.Gulp, options?: gulpHelp.GulpHelpOptions): gulpHelp.GulpHelp;
export = gulpHelp;
}