forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp-uglify.d.ts
42 lines (34 loc) · 1.66 KB
/
gulp-uglify.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
// Type definitions for gulp-uglify
// Project: https://github.com/terinjokes/gulp-uglify
// Definitions by: Christopher Haws <https://github.com/ChristopherHaws/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts"/>
/// <reference path="../uglify-js/uglify-js.d.ts"/>
declare module "gulp-uglify" {
import * as UglifyJS from 'uglify-js';
namespace GulpUglify {
interface Options {
/**
* Pass false to skip mangling names.
*/
mangle?: boolean;
/**
* Pass if you wish to specify additional output options. The defaults are optimized for best compression.
*/
output?: UglifyJS.BeautifierOptions;
/**
* Pass an object to specify custom compressor options. Pass false to skip compression completely.
*/
compress?: UglifyJS.CompressorOptions | boolean;
/**
* A convenience option for options.output.comments. Defaults to preserving no comments.
* all - Preserve all comments in code blocks
* some - Preserve comments that start with a bang (!) or include a Closure Compiler directive (@preserve, @license, @cc_on)
* function - Specify your own comment preservation function. You will be passed the current node and the current comment and are expected to return either true or false.
*/
preserveComments?: string|((node: any, comment: UglifyJS.Tokenizer) => boolean);
}
}
function GulpUglify(options?: GulpUglify.Options): NodeJS.ReadWriteStream;
export = GulpUglify;
}