laravel-elixir-html-minify
v1.0.1
Published
Minify html files with Laravel Elixir
Maintainers
Readme
Laravel Elixir HTML minify
This package allows you to minify static html files. This is useful when you are using static partials loaded through ajax, for example on an angular application.
Installation
First you need to install this package.
npm install --save-dev laravel-elixir-html-minifyThen require this package into your gulpfile.js.
var Elixir = require('laravel-elixir');
require('laravel-elixir-html-minify');Then call the html method from your mix.
The html method can take up to four arguments:
src(required): The files to minify.outputPath(optional): The output folder (defaults topublic/html).baseDir(optional): The folder in which your html files are stored (defaults toresources/assets/html).options(optional): Options object passed to thegulp-html-minifytask.
This task defines a watcher for the path defined in src.
Sample code:
Elixir(function(mix) {
mix.html('**/*.html', 'public/html', 'resources/assets/html', {quotes: true, loose: true, empty: true});
});