You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

gobem-proc-uglify

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gobem-proc-uglify

Processor to minify javascript files for gobem builder.

0.0.5
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

gobem-proc-uglify

This processor for gobem minifies javascript files using uglify-js. All options are passed as a single object. Empty files are just skipped during processing. gobem-proc-uglify requires directory to cache results of the work.

The following options are supported:

  • ignoreErrors
    If this flag is true and error occured, raw file's content will be written instead minified one.
  • cacheDir
    Full path to a readable and writable directory to cache files.

Also there is one useful feature: if you don't want to minify some specific file, just add one of the following lines into any place:

  • /* prevent uglify */
  • // prevent uglify
  • 'prevent uglify';
  • "prevent uglify";

Example for build.js

module.exports = function () {
    return [
        ['select', 0, /^components\/(\w+)\/\1\.es2015.js$/],
        ['gobem-proc-uglify', {ignoreErrors: true}],
        ['write', 1]
    ]; // this array will be used as build instructions
};

Keywords

gobem

FAQs

Package last updated on 27 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts