
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Speed up your static site with one command: fastatic
Static site generators are the next big thing. Fastatic takes the ouput of any static site generator (Jekyll, Hugo and many others) and optimises it. The result: faster static sites.
Fastatic minifies your HTML, CSS, JS, JSON, XML and images. See issues for more planned improvements.
Running Fastatic on the React's static site files results in a faster site:
┌───────────────────────────┬─────────────┬──────────────┬────────────────┐
│Filetype │Original size│Optimized size│ Saving│
├───────────────────────────┼─────────────┼──────────────┼────────────────┤
│**/*.css │ 29.51 KB│ 22.57 KB│ 6.94 KB (24%)│
├───────────────────────────┼─────────────┼──────────────┼────────────────┤
│**/*.html │ 8.77 MB│ 7.47 MB│ 1.30 MB (15%)│
├───────────────────────────┼─────────────┼──────────────┼────────────────┤
│**/*.{gif,jpg,jpeg,png,svg}│ 14.83 MB│ 13.44 MB│ 1.39 MB (9%)│
├───────────────────────────┼─────────────┼──────────────┼────────────────┤
│**/*.js │ 2.06 MB│ 1.36 MB│ 714.22 KB (34%)│
├───────────────────────────┼─────────────┼──────────────┼────────────────┤
│**/*.xml │ 197.68 KB│ 197.30 KB│ 381 B (0%)│
├───────────────────────────┼─────────────┼──────────────┼────────────────┤
│Total │ 25.94 MB│ 22.54 MB │ 3.39 MB (13%)│
└───────────────────────────┴─────────────┴──────────────┴────────────────┘
Fastatic works out-of-the-box with zero configuration.
You can use Fastatic both as a CLI tool and programmatically in JS.
Fastatic is written in Node.js and can be installed via npm:
$ npm install fastatic
Optimise all static files in current directory:
$ fastatic
Optimise all static files in a specific directory:
$ fastatic my-static-site-source/
Optimise all static files from a specific directory and output to a different directory using --dest:
$ fastatic my-static-site-source/ --dest my-static-site-dest/
To use Fastatic programmatically import the fastatic module:
const fastatic = require('fastatic');
Optimise all static files in current directory:
fastatic();
Optimise all static files in a specific directory:
fastatic({ src: 'my-static-site-source/' });
Optimise all static files from a specific directory and output to a different directory:
fastatic({ src: 'my-static-site-source/', dest: 'my-static-site-dest/' });
See CONTRIBUTING.md for guidelines and development scripts.
FAQs
Speed up your static site
We found that fastatic 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.