New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bfred-npm-bundler

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfred-npm-bundler - npm Package Compare versions

Comparing version 7.0.1 to 7.1.0

52

index.js
#!/usr/bin/env node
'use strict';
const path = require('path');
const rollup = require('rollup').rollup;
const buble = require('rollup-plugin-buble');
const uglify = require('rollup-plugin-uglify');
const requireExternals = require('rollup-plugin-node-resolve');
const filesize = require('rollup-plugin-filesize');
require('loud-rejection')();
const packageInfo = require(path.resolve('./package.json'));
const banner = `/*! npm.im/${packageInfo.name} */`;

@@ -16,3 +20,4 @@ const outputFilename = process.argv[2];

if (globalVarName === '--byte-count') {
const isByteCountingOnly = globalVarName === '--byte-count';
if (isByteCountingOnly) {
globalVarName = 'bytes';

@@ -26,3 +31,5 @@ iifeName = 'byte-count';

console.log('Files built:');
console.log('Building:');
console.log('•', cjsName);
console.log('•', esName);
rollup({

@@ -33,13 +40,16 @@ entry: 'index.js',

]
}).then(bundle => {
}).then(bundle => Promise.all([
bundle.write({
format: 'cjs',
dest: cjsName
}).then(() => console.log('•', cjsName));
dest: cjsName,
banner
}),
bundle.write({
format: 'es',
dest: esName
}).then(() => console.log('•', esName));
});
dest: esName,
banner
})
])).catch(err => console.log(err));
if (globalVarName) {
console.log('•', iifeName);
rollup({

@@ -49,11 +59,25 @@ entry: 'index.js',

buble(),
uglify()
requireExternals({
browser: true,
jsnext: true
}),
uglify(isByteCountingOnly ? {
output: {
comments: (node, comment) => {
if (comment.type === 'comment2') {
return comment.value[0] === '!';
}
}
}
} : {}),
filesize()
]
}).then(bundle => {
}).then(bundle =>
bundle.write({
format: 'iife',
moduleName: globalVarName,
dest: iifeName
}).then(() => console.log('•', iifeName));
});
dest: iifeName,
banner
})
).catch(err => console.log(err));
}
{
"name": "bfred-npm-bundler",
"version": "7.0.1",
"version": "7.1.0",
"description": "Opinionated ES6 library bundler based on rollup and buble",

@@ -13,5 +13,6 @@ "license": "MIT",

"dependencies": {
"loud-rejection": "^1.5.0",
"rollup": "^0.32.0",
"rollup-plugin-buble": "^0.11.0",
"rollup-plugin-filesize": "^0.4.4",
"rollup-plugin-node-resolve": "^1.7.0",
"rollup-plugin-uglify": "^1.0.0"

@@ -18,0 +19,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