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.0.1
  • Source
  • npm
  • Socket score

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

Minifyify

Minify your browserify bundle without losing the sourcemap

Usage

Just like how you would use concat-stream.

var mold = require('mold-source-map')
  , browserify = require('browserify')
  , minifyify = require('minifyify')
  , bundle = browserify();

bundle.add(something);

bundle.bundle({debug: true})
.on('error', function (err) { console.error(err); })

// Shorten your source maps
.pipe(mold.transformSourcesRelativeTo(path.dirname(inputFile)))

// Magic happens here
.pipe(minifyify(function (src, map) {
  // Don't forget to append the sourceMappingURL yourself
  fs.writeFileSync(OUTPUT_FILE, src  + ';\n//@ sourceMappingURL=/scripts.map\n');
  fs.writeFileSync(OUTPUT_MAP, map);
});

License

MIT

Keywords

FAQs

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