🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

customize-engine-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

customize-engine-uglify

UglifyJS adapter for Customize

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
608
19.92%
Maintainers
1
Weekly downloads
 
Created
Source

customize-engine-uglify

NPM version Travis Build Status Coverage Status

UglifyJS adapter for Customize

Installation

npm install customize-engine-uglify

Usage

The following example demonstrates how to use this module:

var customize = require('customize')

// Load files from one directory and merge with a second one
customize()
  .registerEngine('uglify', require('customize-engine-uglify'))
  // Add two javascript files
  .merge({
    uglify: {
      files: {
        'a-browser-lib.js': require.resolve('./module1/a-browser-lib.js'),
        'another-browser-lib.js': require.resolve('./module1/another-browser-lib.js')
      },
      dependencies: {
        'a-browser-lib.js': [ 'another-browser-lib.js' ]
      }
    }
  })
  // Add another js file overriding "a-browser-lib.js"
  .merge({
    uglify: {
      files: {
        'a-browser-lib.js': require.resolve('./module2/overriding-browser-lib.js')
      }
    }
  })
  .run()
  .done(console.log)

This will generate the following output

{ uglify: 
   { 'bundle.js': 'console.log("another-browser-lib"),console.log("overriding-browser-lib");\n//# sourceMappingURL=bundle.js.map',
     'bundle.js.map': '{"version":3,"sources":["/home/nknappmeier/projects/bootprint/customize-engine-uglify/examples/module1/another-browser-lib.js","/home/nknappmeier/projects/bootprint/customize-engine-uglify/examples/module2/overriding-browser-lib.js"],"names":["console","log"],"mappings":"AAAAA,QAAQC,IAAI,uBCAZD,QAAQC,IAAI","file":"bundle.js"}' } }

API-reference

License

customize-engine-uglify is published under the MIT-license. See LICENSE.md for details.

Release-Notes

For release notes, see CHANGELOG.md

Contributing guidelines

See CONTRIBUTING.md.

FAQs

Package last updated on 20 Dec 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