All dependencies needed to run the tests are pre-configured in
package.json. You just need to install these:
Note: it's smart to update to the latest versions of these dependencies.
Configure in- and output directory
scripts/compress.js (both default to
Run compress script
Compress all files in
inputDir and write to
npm run compress
Note: This setup contains an example file in
As this setup uses the
inputDir as the
outputDir the compressed files are placed right next to the original.
Configure server to use precompressed files
You'll need to configure your server to serve the precompressed files when available. In addition you can enable on-the-fly compression of dynamic assets.