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