forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp-shell.d.ts
68 lines (61 loc) · 2.5 KB
/
gulp-shell.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
// Type definitions for gulp-shell
// Project: https://github.com/sun-zheng-an/gulp-shell
// Definitions by: Qubo <https://github.com/tkqubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "gulp-shell" {
namespace shell {
interface Shell {
(commands: string|string[], options?: Option): NodeJS.ReadWriteStream;
task(commands: string|string[], options?: Option): () => NodeJS.ReadWriteStream;
}
interface Option {
/**
* You can add a custom error message for when the command fails. This can be a template which can be
* interpolated with the current command, some file info (e.g. file.path) and some error info
* (e.g. error.code).
* @default 'Command `<%= command %>` failed with exit code <%= error.code %>'
*/
errorMessage?: string;
/**
* By default, it will emit an error event when the command finishes unsuccessfully.
* @default false
*/
ignoreErrors?: boolean;
/**
* By default, it will print the command output.
* @default false
*/
quiet?: boolean;
/**
* Sets the current working directory for the command.
* @default process.cwd()
*/
cwd?: string;
/**
* The data that can be accessed in template.
*/
templateData?: any;
/**
* You won't need to set this option unless you encounter a "stdout maxBuffer exceeded" error.
* @default 16MB(16 * 1024 * 1024)
*/
maxBuffer?: number;
/**
* The maximum amount of time in milliseconds the process is allowed to run.
* @default
*/
timeout?: number;
/**
* By default, all the commands will be executed in an environment with all the variables in process.env
* and PATH prepended by ./node_modules/.bin (allowing you to run executables in your Node's dependencies).
* You can override any environment variables with this option.
* For example, setting it to {PATH: process.env.PATH} will reset the PATH
* if the default one brings your some troubles.
*/
env?: any;
}
}
var shell: shell.Shell;
export = shell;
}