gulp-html2js icon indicating copy to clipboard operation
gulp-html2js copied to clipboard

Anyway to use the htmlmin option?

Open dander401 opened this issue 8 years ago • 1 comments

I have the following task

    return gulp.src( [
            webRoot + '**/*.html'
        ] )
        .pipe( $.debug( {
            title: 'localTemplates'
        } ) )
        .pipe( $.html2js( 'templates.js', {      //not sure what temp
            adapter: 'angular',
            base: 'src/main/static/templates',
            name: 'dander',
            htmlmin: {
                collapseBooleanAttributes: true,
                collapseWhitespace: true,
                removeAttributeQuotes: true,
                removeComments: true,
                removeEmptyAttributes: true,
                removeRedundantAttributes: true,
                removeScriptTypeAttributes: true,
                removeStyleLinkTypeAttributes: true
            }
        } ) )
        .pipe( gulp.dest( distRoot + '/templates' ) );

After the task runs, the html is unchanged. Am I doing something wrong?

dander401 avatar Apr 06 '16 20:04 dander401

This isn't grunt. Create task for htmlmin and html2js and set, that html2js depends/requires htmlmin task to run thirst or other way around. How you need.

jeserkin avatar May 28 '16 09:05 jeserkin