diff --git a/types/gulp-strip-comments/gulp-strip-comments-tests.ts b/types/gulp-strip-comments/gulp-strip-comments-tests.ts new file mode 100644 index 0000000000..737f2c16a2 --- /dev/null +++ b/types/gulp-strip-comments/gulp-strip-comments-tests.ts @@ -0,0 +1,12 @@ +import * as gulp from 'gulp'; +import stripComments = require('gulp-strip-comments'); + +gulp.task('default', () => { + return gulp.src('src/app.js') + .pipe(stripComments({ + safe: true, + })) + .pipe(stripComments.html()) + .pipe(stripComments.text()) + .pipe(gulp.dest('dist')); +}); diff --git a/types/gulp-strip-comments/index.d.ts b/types/gulp-strip-comments/index.d.ts new file mode 100644 index 0000000000..a516bd7c87 --- /dev/null +++ b/types/gulp-strip-comments/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for gulp-strip-comments 2.5 +// Project: https://github.com/RnbWd/gulp-strip-comments +// Definitions by: Aqours +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace stripComments { + interface StripOptions { + safe?: boolean; + ignore?: RegExp | RegExp[]; + space?: boolean; + trim?: boolean; + } + + interface Strip { + (options?: StripOptions): NodeJS.ReadWriteStream; + text(options?: StripOptions): NodeJS.ReadWriteStream; + html(options?: StripOptions): NodeJS.ReadWriteStream; + getEOL(): string; + } +} + +declare const strip: stripComments.Strip; + +export = strip; diff --git a/types/gulp-strip-comments/tsconfig.json b/types/gulp-strip-comments/tsconfig.json new file mode 100644 index 0000000000..08db2f47d9 --- /dev/null +++ b/types/gulp-strip-comments/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-strip-comments-tests.ts" + ] +} diff --git a/types/gulp-strip-comments/tslint.json b/types/gulp-strip-comments/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gulp-strip-comments/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }