
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
node-compressor
Advanced tools
A complete solution to compress static files with node inspired by django-compressor
npm install node-compressor -g
It's a command line tool that receives as parameter an HTML file and compresses the JavaScript and CSS files called. It also minify the HTML file.
The files that you want to compress must be between <!-- compress js/css --> and <!-- endcompress -->, for example, like this:
After, run this command in your Terminal:
node-compressor YOUR_FILE-1.html YOUR_FILE-2.html
Then, Node Compress will compress these files and deliver them within the directory .compressed
Wrap the assets as you'd like them to be concatenated:
<!-- compress js -->
<script src="foo/bar.js"></script>
<script src="lol/yey.js"></script>
<!-- endcompress -->
<!-- compress js -->
<script src="pow/go.js"></script>
<script src="cca/xyzzy.js"></script>
<!-- endcompress -->
After the compression the result will be like this:
<script src="js/72b302bf297a228a75730123efef7c41.js"></script>
<script src="js/aca25d624cf863f786f67137c62aa11d.js"></script>
FAQs
A complete solution to compress static files
The npm package node-compressor receives a total of 2 weekly downloads. As such, node-compressor popularity was classified as not popular.
We found that node-compressor 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.