Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minifyify

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minifyify

Minify your browserify bundles without losing the sourcemap

  • 0.3.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by15.71%
Maintainers
1
Weekly downloads
 
Created
Source

Minifyify

Tiny, Debuggable Browserify Bundles

Build Status

Before, browserify made you choose between sane debugging and sane load times. Now, you can have both.

Minifyify minifies your bundle and pulls the source map out into a separate file. Now you can deploy a minified bundle in production, and still have a sourcemap handy for when things inevitably break!

Known Issues

There is an issue in browserify that results in broken sourcemaps. Use my patched fork until the PR gets merged.

Usage

var browserify = require('browserify')
  , minifyify = require('minifyify')
  , path = require('path')
  , bundle = new browserify()
  , transforms = [require('hbsfy')]
  , opts = {
      // The URL the source is available at
      file: '/bundle.js'

      // The URL this map is available at
    , map: '/bundle.map'

      // Use this option to compress paths
    , compressPaths: function (p) {
        return path.relative('./www', p);
      }

      // If you use transforms, specify them here
      // Do *not* apply them to the bundle yourself!
    , transforms: transforms
    };

bundle.add('entryScript.js');

minifyify(bundle, opts, function(code, map) {
  // SourceMappingURL comment is already added for you at this point
  fs.writeFileSync('www/bundle.js', code);
  fs.writeFileSync('www/bundle.map', map);
});

License

MIT

Keywords

FAQs

Package last updated on 16 Aug 2013

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc