pull-minify

0.2.0 • Public • Published

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)

Package Sidebar

Install

npm i pull-minify

Weekly Downloads

0

Version

0.2.0

License

none

Last publish

Collaborators

  • npm