1 |
|
2 |
|
3 | import vinyl = require("vinyl");
|
4 | import chalk from "chalk";
|
5 | import through2 = require("through2");
|
6 |
|
7 | export { vinyl as File };
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export function replaceExtension(npath: string, ext: string): string;
|
13 |
|
14 | export const colors: typeof chalk;
|
15 |
|
16 | export const date: {
|
17 | (now?: Date | string, mask?: string, convertLocalTimeToUTC?: boolean): any;
|
18 | masks: any;
|
19 | };
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | export function log(message?: any, ...optionalParams: any[]): void;
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | export function template(tmpl: string): (opt: { file: { path: string } }) => string;
|
33 | export function template(tmpl: string, opt: { file: { path: string } }): string;
|
34 |
|
35 | export const env: any;
|
36 |
|
37 | export function beep(): void;
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | export const noop: typeof through2;
|
43 |
|
44 | export function isStream(obj: any): boolean;
|
45 |
|
46 | export function isBuffer(obj: any): boolean;
|
47 |
|
48 | export function isNull(obj: any): boolean;
|
49 |
|
50 | export const linefeed: string;
|
51 |
|
52 | export function combine(streams: NodeJS.ReadWriteStream[]): () => NodeJS.ReadWriteStream;
|
53 | export function combine(...streams: NodeJS.ReadWriteStream[]): () => NodeJS.ReadWriteStream;
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | export function buffer(cb?: (err: Error, data: any[]) => void): NodeJS.ReadWriteStream;
|
60 |
|
61 | export class PluginError implements Error, PluginErrorOptions {
|
62 | constructor(options?: PluginErrorOptions);
|
63 | constructor(pluginName: string, options?: PluginErrorOptions);
|
64 | constructor(pluginName: string, message: string | Error, options?: PluginErrorOptions);
|
65 | /**
|
66 | * The module name of your plugin.
|
67 | */
|
68 | name: string;
|
69 | /**
|
70 | * Can be a string or an existing error.
|
71 | */
|
72 | message: any;
|
73 | fileName: string;
|
74 | lineNumber: number;
|
75 | /**
|
76 | * You need to include the message along with this stack. If you pass an
|
77 | * error in as the message the stack will be pulled from that, otherwise one
|
78 | * will be created.
|
79 | */
|
80 | stack: string;
|
81 | /**
|
82 | * By default the stack will not be shown. Set this to true if you think the
|
83 | * stack is important for your error.
|
84 | */
|
85 | showStack: boolean;
|
86 | /**
|
87 | * Error properties will be included in err.toString(). Can be omitted by
|
88 | * setting this to false.
|
89 | */
|
90 | showProperties: boolean;
|
91 | plugin: string;
|
92 | error: Error;
|
93 | }
|
94 |
|
95 | export interface PluginErrorOptions {
|
96 | /**
|
97 | * The module name of your plugin.
|
98 | */
|
99 | name?: string | undefined;
|
100 | /**
|
101 | * Can be a string or an existing error.
|
102 | */
|
103 | message?: any;
|
104 | fileName?: string | undefined;
|
105 | lineNumber?: number | undefined;
|
106 | /**
|
107 | * You need to include the message along with this stack. If you pass an
|
108 | * error in as the message the stack will be pulled from that, otherwise one
|
109 | * will be created.
|
110 | */
|
111 | stack?: string | undefined;
|
112 | /**
|
113 | * By default the stack will not be shown. Set this to true if you think the
|
114 | * stack is important for your error.
|
115 | */
|
116 | showStack?: boolean | undefined;
|
117 | /**
|
118 | * Error properties will be included in err.toString(). Can be omitted by
|
119 | * setting this to false.
|
120 | */
|
121 | showProperties?: boolean | undefined;
|
122 | plugin?: string | undefined;
|
123 | error?: Error | undefined;
|
124 | }
|