File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ /// <reference path="gulp-minify-html.d.ts" />
2
+ /// <reference path="../gulp/gulp.d.ts" />
3
+
4
+ import gulp = require( 'gulp' ) ;
5
+ import minifyHtml = require( 'gulp-minify-html' ) ;
6
+
7
+ minifyHtml ( ) ;
8
+ minifyHtml ( { conditionals : true , loose : true } ) ;
9
+
10
+ gulp . task ( 'minify-html' , ( ) => {
11
+ var opts = {
12
+ conditionals : true ,
13
+ spare : true
14
+ } ;
15
+
16
+ return gulp . src ( './static/html/*.html' )
17
+ . pipe ( minifyHtml ( opts ) )
18
+ . pipe ( gulp . dest ( './dist/' ) ) ;
19
+ } ) ;
Original file line number Diff line number Diff line change
1
+ // Type definitions for gulp-minify-html v1.0.2
2
+ // Project: https://github.com/murphydanger/gulp-minify-html
3
+ // Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
4
+ // Definitions: https://github.com/borisyankov/DefinitelyTyped
5
+
6
+ /// <reference path="../node/node.d.ts" />
7
+
8
+ declare module 'gulp-minify-html' {
9
+ interface IOptions {
10
+ // Do not remove empty attributes
11
+ empty ?: boolean ;
12
+
13
+ // Do not strip CDATA from scripts
14
+ cdata ?: boolean ;
15
+
16
+ // Do not remove comments
17
+ comments ?: boolean ;
18
+
19
+ // Do not remove conditional internet explorer comments
20
+ conditionals ?: boolean ;
21
+
22
+ // Do not remove redundant attributes
23
+ spare ?: boolean ;
24
+
25
+ // Do not remove arbitrary quotes
26
+ quotes ?: boolean ;
27
+
28
+ // Preserve one whitespace
29
+ loose ?: boolean ;
30
+ }
31
+
32
+ function minifyHtml ( options ?: IOptions ) : NodeJS . ReadWriteStream ;
33
+
34
+ export = minifyHtml ;
35
+ }
You can’t perform that action at this time.
0 commit comments