
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
bfred-npm-bundler
Advanced tools
It's for my own modules, but maybe you can find it useful too. It changes often (but follows semver). Unannounced PRs generally not welcome, but feel free to open issues to discuss first.
It outputs the following files:
[libName]
"main": "dist/[lib-name].common-js.js",
in package.json"module": "dist/[lib-name].es-modules.js",
in package.jsonInstall it in your project:
npm install --save-dev bfred-npm-bundler
Add the references to the generated files and the build step in your package.json
:
{
"main": "dist/lib-name.common-js.js",
"module": "dist/lib-name.es-modules.js",
"jsnext:main": "dist/lib-name.es-modules.js",
"scripts": {
"build": "bfred-npm-bundler lib-name libName",
"prepublish": "npm run build"
}
}
If your lib only makes sense inside node/browserify, you can skip the browser
file creation by not passing the second argument:
bfred-npm-bundler lib-name
instead of bfred-npm-bundler lib-name libName
The browser
file is useful to be used for byte-counting via gzip-size-cli
or with badges. If your package is node-only, you can pass the option --byte-count
and a dist/[lib-name].size-measuring-only.js file will be created.
rollup-babel-lib-bundler is more configurable
MIT © Federico Brigante
FAQs
Opinionated ES6 library bundler based on rollup and buble
We found that bfred-npm-bundler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.