Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
assets-packager
Advanced tools
Very fast assets packager - combines power of seq, uglify-js, gzip, assets-expander, clean-css and couple other tools to build assets insanely fast
Assets-packager is a node.js-based tool for compiling, minifying, and packaging CSS and JavaScript assets into production-ready packages.
CSS bundles are created from assets which are
And JavaScripts ones are
npm install -g assets-packager
OK. Clone this repo.
git clone git@github.com:GoalSmashers/assets-packager.git
Then open examples directory and run:
assetspkg -c assets.yml -g
Now check examples/public/javascripts/bundled and examples/public/stylesheets/bundled for bundled code. That's it!
You should have just witnessed it by yourself. :-)
We use it on our production servers at GoalSmashers.com and it builds 20 CSS and 15 JavaScript bundles from hundreds of assets in around 15 seconds.
So yes, it is fast!
First of all it assumes you have Rails-like directory structure for your assets, e.g:
Then it also needs a configuration file (here we name it assets.yml) with a definition of JS/CSS bundles, e.g:
# stylesheets
stylesheets:
application: 'reset,grid,base,application'
# javascripts
javascripts:
application:
- 'vendor/jquery'
- 'application,helpers'
We recommend placing it somewhere else than in your public folder (could be config in case of Rails).
Now you can bundle all these packages with a single command:
assetspkg -c assets.yml
All the packages go into public/javascripts/bundled and public/stylesheets/bundled. You'll probably want to put that command somewhere into your build/deploy script.
assetspkg -h
Options include:
beautify
option of UglifyJS)Open an issue. Or better: fork the project, add the feature (don't forget about tests!) and send a pull request.
First, install dependencies
npm install
npm install -g less@latest
Then, run the specs
make test
Assets-packager is released under the MIT license.
FAQs
Very fast assets pipeline - combines power of async, uglify-js, clean-css, enhance-css and couple other tools to make your assets production-ready
We found that assets-packager 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.