Socket
Socket
Sign inDemoInstall

metalsmith-browserify

Package Overview
Dependencies
Maintainers
2
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 1.0.2 to 1.0.3

22

lib/index.js
const { Readable } = require('stream');
const path = require('path');
const fs = require('fs');
const debug = require('debug')('metalsmith-browserify');

@@ -59,4 +60,23 @@ const browserify = require('browserify');

const source = metalsmith.source();
const promises = options.entries.map(file => bundle({ file, options, source, files }));
// remove entries that are not present in files
// this can happen during metalsmith-watch
// as only changed files are present in the files object
function isInFiles(file) {
if (!files[file]) {
debug(`File ${file} not found.`);
return false;
}
return true;
}
function bundleFile(file) {
return bundle({ file, options, source, files });
}
const promises = options.entries
.filter(isInFiles)
.map(bundleFile);
return Promise.all(promises)

@@ -63,0 +83,0 @@ .then(() => done())

2

package.json
{
"name": "metalsmith-browserify",
"version": "1.0.2",
"version": "1.0.3",
"description": "Metalsmith plugin to bundle JS with browserify",

@@ -5,0 +5,0 @@ "repository": {

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