mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add definitions for gulp-minify-html (https://github.com/murphydanger/gulp-minify-html)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/// <reference path="gulp-minify-html.d.ts" />
|
||||
/// <reference path="../gulp/gulp.d.ts" />
|
||||
|
||||
import gulp = require('gulp');
|
||||
import minifyHtml = require('gulp-minify-html');
|
||||
|
||||
minifyHtml();
|
||||
minifyHtml({conditionals: true, loose: true});
|
||||
|
||||
gulp.task('minify-html', () => {
|
||||
var opts = {
|
||||
conditionals: true,
|
||||
spare: true
|
||||
};
|
||||
|
||||
return gulp.src('./static/html/*.html')
|
||||
.pipe(minifyHtml(opts))
|
||||
.pipe(gulp.dest('./dist/'));
|
||||
});
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
// Type definitions for gulp-minify-html v1.0.2
|
||||
// Project: https://github.com/murphydanger/gulp-minify-html
|
||||
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module 'gulp-minify-html' {
|
||||
interface IOptions {
|
||||
// Do not remove empty attributes
|
||||
empty?: boolean;
|
||||
|
||||
// Do not strip CDATA from scripts
|
||||
cdata?: boolean;
|
||||
|
||||
// Do not remove comments
|
||||
comments?: boolean;
|
||||
|
||||
// Do not remove conditional internet explorer comments
|
||||
conditionals?: boolean;
|
||||
|
||||
// Do not remove redundant attributes
|
||||
spare?: boolean;
|
||||
|
||||
// Do not remove arbitrary quotes
|
||||
quotes?: boolean;
|
||||
|
||||
// Preserve one whitespace
|
||||
loose?: boolean;
|
||||
}
|
||||
|
||||
function minifyHtml(options?: IOptions): NodeJS.ReadWriteStream;
|
||||
|
||||
export = minifyHtml;
|
||||
}
|
||||
Reference in New Issue
Block a user