fp-uglify

0.2.8 • Public • Published

Uglify extension for Fepper client-side JavaScript

Known Vulnerabilities Linux Build Status Mac Build Status Windows Build Status Coverage Status License

Install

cd extend
npm install --save-dev fp-uglify

Use

Add these tasks to extend/contrib.js

  • Under gulp task 'contrib:frontend-copy'
    • 'uglify'
  • Under gulp task 'contrib:static'
    • 'uglify'

On the command line:

fp uglify

This extension minifies .js files in the paths.source.jsSrc directory as declared in patternlab-config.json. This minifies with UglifyJS, so ES6+ is not supported.

Options can be set in pref.yml as per these examples:

uglify:
  # Respects most options documented at
  # https://github.com/mishoo/UglifyJS2#minify-options
  # The sourceMap option is a little different.
  # Setting it to true writes default external sourcemaps,
  # one per `.js` file.
  # By default, external sourcemaps will take the name of
  # the `.js` file and append `.map`. 
  sourceMap: true

The following will write sourcemaps inline:

uglify:
  sourceMap:
    url: inline

Tasks

'uglify'

  • Writes the minified JavaScript to the paths.source.jsBld directory as declared in patternlab-config.json. The minified files will have .min.js extensions.

Package Sidebar

Install

npm i fp-uglify

Weekly Downloads

3

Version

0.2.8

License

MIT

Unpacked Size

7.16 kB

Total Files

4

Last publish

Collaborators

  • e2tha-e
  • electric-el