JSPM

pull-minify

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q9312F

Minify JS and CSS files inside a pull-stream

Package Exports

  • pull-minify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pull-minify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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)