diff --git a/gulp-uglify/gulp-uglify-tests.ts b/gulp-uglify/gulp-uglify-tests.ts
index e4f1f0d8a..01cfb06f9 100644
--- a/gulp-uglify/gulp-uglify-tests.ts
+++ b/gulp-uglify/gulp-uglify-tests.ts
@@ -1,8 +1,8 @@
-///
+///
///
-import gulp = require("gulp");
-import uglify = require("gulp-uglify");
+import * as gulp from 'gulp';
+import * as uglify from 'gulp-uglify';
gulp.task('compress', function() {
var tsResult = gulp.src('lib/*.ts')
@@ -21,4 +21,4 @@ gulp.task('compress2', function() {
}
}))
.pipe(gulp.dest('dist'));
-});
\ No newline at end of file
+});
diff --git a/gulp-uglify/gulp-uglify.d.ts b/gulp-uglify/gulp-uglify.d.ts
index 05eb937ed..b070f3f35 100644
--- a/gulp-uglify/gulp-uglify.d.ts
+++ b/gulp-uglify/gulp-uglify.d.ts
@@ -4,172 +4,39 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///
+///
declare module "gulp-uglify" {
- function GulpUglify(options?: IGulpUglifyOptions): NodeJS.ReadWriteStream;
+ import * as UglifyJS from 'uglify-js';
- interface IGulpUglifyOptions {
- /**
- * Pass false to skip mangling names.
- */
- mangle?: boolean;
+ 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?: IOutputOptions;
+ /**
+ * 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?: boolean;
+ /**
+ * 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.
- */
- preserverComments?: string|((node: any, comment: ITokenizer) => 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.
+ */
+ preserverComments?: string|((node: any, comment: UglifyJS.Tokenizer) => boolean);
+ }
}
- interface IOutputOptions {
- /**
- * Start indentation on every line (only when `beautify`)
- */
- indent_start?: number;
+ function GulpUglify(options?: GulpUglify.Options): NodeJS.ReadWriteStream;
- /**
- * Indentation level (only when `beautify`)
- */
- indent_level?: number;
-
- /**
- * Quote all keys in object literals?
- */
- quote_keys?: boolean;
-
- /**
- * Add a space after colon signs?
- */
- space_colon?: boolean;
-
- /**
- * Output ASCII-safe? (encodes Unicode characters as ASCII)
- */
- ascii_only?: boolean;
-
- /**
- * Escape "