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

metalsmith-browserify

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-browserify - npm Package Compare versions

Comparing version 0.2.4 to 0.3.0

27

index.js

@@ -47,17 +47,20 @@ 'use strict';

function create(first) {
var s;
if (options.sourcemaps) {
s = b.bundle()
.on('error', console.error.bind(console))
.pipe(exorcist(bundleDest + '.map'))
.pipe(fs.createWriteStream(bundleDest), 'utf8');
b.bundle(function(err, buffer) {
if (err) return callback(err);
files[options.dest] = {
contents: buffer
};
callback();
})
.pipe(exorcist(bundleDest + '.map'));
} else {
s = b.bundle()
.on('error', console.error.bind(console))
.pipe(fs.createWriteStream(bundleDest), 'utf8');
b.bundle(function(err, buffer) {
if (err) return callback(err);
files[options.dest] = {
contents: buffer
};
callback();
});
}
if (first) {
s.on('finish', callback);
}
}

@@ -64,0 +67,0 @@

{
"name": "metalsmith-browserify",
"version": "0.2.4",
"version": "0.3.0",
"description": "Metalsmith plugin to bundle JS with browserify",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -38,21 +38,2 @@ [![Build Status](https://travis-ci.org/kopa-app/metalsmith-browserify.svg)](https://travis-ci.org/kopa-app/metalsmith-browserify)

If you need to manipulate the created browserify bundle do:
```javascript
var metalsmith = require('metalsmith');
var browserify = require('metalsmith-browserify');
var b = browserify({
dest: 'js/bundle.js',
entires: ['./src/js/index.js']
);
// do stuff with the bundle
b.bundle.external(/*...*/);
metalsmith(__dirname)
.use(b) // use the plugin
.build()
```
It can also be used with `metalsmith.json` by adding the plugin like this:

@@ -59,0 +40,0 @@

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