Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
bb-asset-manager
Advanced tools
Yet another asset manager for NodeJS.
This package allows you to declare a directory that will be served statically on your webserver. You can then package files in that directory together into concatenated and minified assets which can be easily included in your HTML. You can also easily switch between using raw and minified assets e.g. for easier debugging in development.
npm install --save bb-asset-manager
var AssetMan = require('bb-asset-manager');
var assetMan = new AssetMan({
staticDirectory: __dirname + '/static', // Where your static assets live
outputDirectory: '/minified', // Relative to staticDirectory
});
assetMan.addAsset('bootstrap', {
js: ['bower_components/bootstrap/bootstrap.js'],
css: ['bower_components/bootstrap/bootstrap.css'],
});
assetMan.addAsset('home', {
css: ['css/home.css'],
dependencies: ['bootstrap'],
})
assetMan.compileSync();
console.log(assetMan.renderAsset('home'))
Will output
<link rel="stylesheet" type="text/css" href="/minified/css/home.css">
<script type="text/javascript" src="/minified/js/home.js"></script>
See Advanced Usage for details on controlling minification, concatenation, and file ordering.
Contributions are welcome! I'll try to respond to PRs within 24 hours.
FAQs
A lightweight asset manager for Node
We found that bb-asset-manager 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.