1.0.8 • Published 8 years ago

matanza v1.0.8

Weekly downloads
14
License
MIT
Repository
github
Last release
8 years ago

Matanza

Matanza minifies your html files to whatever directory you want, without applying concatination to a single file.

Usage:

Install Matanza:

$ npm i matanza -g

NPM Scripts:

Examples

Moving all the partials templates from a AngularJs project folder to a distribution or build folder

{
 ...
 "scripts": {
   "partials": "matanza -s ./src/client/app/**/*.html -d ./dist/partials",
 }
 ...
}

Result

-> Not minified                    | -> html minified
+-- app/                            | +-- dist/
   +-- login/                      |     +-- js/
   |   +-- login.controller.js     |     |   +-- bundle.js
   |   +-- login.html              |     +-- css/
   +-- users/                      |     |   +-- style.css   
   |   +-- user.controller.html    |     +-- partials
   |   +-- user.html               |     |   +-- login.html
   +-- task/                       |     |   +-- user.html
   |   +-- task.controller.js      |     |   +-- task.html
   |   +-- task.html               |     |...

Command Line Interface:

Usage: matanza [options] <Dir>

Standard Options:

       --help, -h  Help

     --source, -s  Source directory. Supports globbing

--destination, -d  Destination directory

Programmatic usage:

Install Matanza:

$ npm i matanza --save

After that you can require it in your code and use it:

var matanza = require('matanza');

matanza.minify({
  source: [ './**/*.html' ],
  dest: [ './dist' ],
  minify: {
    collapseWhitespace: true,
    removeComments: true
  }
});
1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago