From 19afef35b34bc2bb86bc692242c0ae6c45bc6adc Mon Sep 17 00:00:00 2001 From: Romain Faust Date: Wed, 22 Aug 2018 17:44:18 +0200 Subject: [PATCH 1/5] Fix how modules are imported --- types/gulp-jsonmin/gulp-jsonmin-tests.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/gulp-jsonmin/gulp-jsonmin-tests.ts b/types/gulp-jsonmin/gulp-jsonmin-tests.ts index 5c0cf66cc3..3b7fe4ee1c 100644 --- a/types/gulp-jsonmin/gulp-jsonmin-tests.ts +++ b/types/gulp-jsonmin/gulp-jsonmin-tests.ts @@ -1,5 +1,4 @@ -import * as GulpJsonmin from 'gulp-jsonmin'; +import GulpJsonmin = require('gulp-jsonmin'); GulpJsonmin(); -GulpJsonmin({}); GulpJsonmin({ verbose: true }); From c4686947c2f0d8af1699aae54f55af55c2ca0d1d Mon Sep 17 00:00:00 2001 From: Romain Faust Date: Wed, 22 Aug 2018 17:51:39 +0200 Subject: [PATCH 2/5] Bump library version --- types/gulp-jsonmin/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/gulp-jsonmin/index.d.ts b/types/gulp-jsonmin/index.d.ts index 16a4347dd2..b246ead5b4 100644 --- a/types/gulp-jsonmin/index.d.ts +++ b/types/gulp-jsonmin/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for gulp-jsonmin 1.1 +// Type definitions for gulp-jsonmin 1.2 // Project: https://github.com/englercj/gulp-jsonmin // Definitions by: Romain Faust // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 78e54b8844b5e4318ff49419dfd9ed3bae20558b Mon Sep 17 00:00:00 2001 From: Romain Faust Date: Wed, 22 Aug 2018 18:21:17 +0200 Subject: [PATCH 3/5] Fix code style --- types/gulp-jsonmin/gulp-jsonmin-tests.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/gulp-jsonmin/gulp-jsonmin-tests.ts b/types/gulp-jsonmin/gulp-jsonmin-tests.ts index 3b7fe4ee1c..23d4ea5427 100644 --- a/types/gulp-jsonmin/gulp-jsonmin-tests.ts +++ b/types/gulp-jsonmin/gulp-jsonmin-tests.ts @@ -1,4 +1,4 @@ -import GulpJsonmin = require('gulp-jsonmin'); +import gulpJsonmin = require('gulp-jsonmin'); -GulpJsonmin(); -GulpJsonmin({ verbose: true }); +gulpJsonmin(); +gulpJsonmin({ verbose: true }); From c966aca3bd501d48e35aa87e41e12665adf1bb32 Mon Sep 17 00:00:00 2001 From: Romain Faust Date: Thu, 23 Aug 2018 18:43:22 +0200 Subject: [PATCH 4/5] Update export name -- Tests improvements -- Restore version number --- types/gulp-jsonmin/gulp-jsonmin-tests.ts | 14 ++++++++++++-- types/gulp-jsonmin/index.d.ts | 8 ++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/types/gulp-jsonmin/gulp-jsonmin-tests.ts b/types/gulp-jsonmin/gulp-jsonmin-tests.ts index 23d4ea5427..e13ec2c69f 100644 --- a/types/gulp-jsonmin/gulp-jsonmin-tests.ts +++ b/types/gulp-jsonmin/gulp-jsonmin-tests.ts @@ -1,4 +1,14 @@ +import gulp = require('gulp'); import gulpJsonmin = require('gulp-jsonmin'); -gulpJsonmin(); -gulpJsonmin({ verbose: true }); +gulp.task('build', () => { + return gulp.src('*.json') + .pipe(gulpJsonmin()) + .pipe(gulp.dest('dist')); +}); + +gulp.task('build', () => { + return gulp.src('*.json') + .pipe(gulpJsonmin({ verbose: true })) + .pipe(gulp.dest('dist')); +}); diff --git a/types/gulp-jsonmin/index.d.ts b/types/gulp-jsonmin/index.d.ts index b246ead5b4..f5502d95cd 100644 --- a/types/gulp-jsonmin/index.d.ts +++ b/types/gulp-jsonmin/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for gulp-jsonmin 1.2 +// Type definitions for gulp-jsonmin 1.1 // Project: https://github.com/englercj/gulp-jsonmin // Definitions by: Romain Faust // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,12 +7,12 @@ import { Transform } from 'stream'; -declare function jsonmin(options?: jsonmin.Options): Transform; +declare function GulpJsonmin(options?: GulpJsonmin.Options): Transform; -declare namespace jsonmin { +declare namespace GulpJsonmin { interface Options { verbose?: boolean; } } -export = jsonmin; +export = GulpJsonmin; From 6013bd6f9de17f35884e59eade39fbdc6e766f55 Mon Sep 17 00:00:00 2001 From: Romain Faust Date: Thu, 23 Aug 2018 19:00:07 +0200 Subject: [PATCH 5/5] Change the export case to be more semantically correct --- types/gulp-jsonmin/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/gulp-jsonmin/index.d.ts b/types/gulp-jsonmin/index.d.ts index f5502d95cd..d5faa2b969 100644 --- a/types/gulp-jsonmin/index.d.ts +++ b/types/gulp-jsonmin/index.d.ts @@ -7,12 +7,12 @@ import { Transform } from 'stream'; -declare function GulpJsonmin(options?: GulpJsonmin.Options): Transform; +declare function gulpJsonmin(options?: gulpJsonmin.Options): Transform; -declare namespace GulpJsonmin { +declare namespace gulpJsonmin { interface Options { verbose?: boolean; } } -export = GulpJsonmin; +export = gulpJsonmin;