0.2.0 • Published 7 years ago

pull-minify v0.2.0

Weekly downloads
11
License
-
Repository
github
Last release
7 years ago

pull-minify

Minify JS and CSS files inside a pull-stream

pull(
  read(__dirname + '/src/**/*.{js,css}'),
  minify({
    js: { mangle: true, toplevel: true },
    css: { restructure: true }
  }),
  write(__dirname + '/out')
)

Install

npm install --save pull-minify
yarn add pull-minify

Usage

minify(options)

Minifies CSS and JS files based on extension

Options are options.js and options.css which go to minify.js and minify.css.

pull(
  read(__dirname + '/src/**/*.{js,css}'),
  minify({
    js: { ...options.js },
    css: { ...options.css }
  }),
  write(__dirname + '/out')
)

You can opt out by passing js: false, css: false, etc.

minify.js(options)

minify.css(options)

Convenience functions. They are identical to:


Maintained by Jamen Marz (See on Twitter and GitHub for questions & updates)