Optimize and compress your simple GHCJS frontend.
Go to file
2022-06-27 12:58:45 +03:00
default.nix Update default.nix 2022-06-27 12:58:45 +03:00
index.html First release 2021-09-12 15:12:28 +03:00
LICENSE Initial commit 2021-09-12 13:52:35 +03:00
Readme.md First release 2021-09-12 15:12:28 +03:00

GHCJS-optimizer

This is a simple nix wrapper that optimizes the js with Google Closure Compiler and compresses text files with zopfli.

This is very simple and intended for a pretty narrow use case: it is intended for use with haskell.nix (but will probably work with other nix builders). It also only uses the all.js file, since it allows more room for optimization, and having one file in most cases will be better than loading multiple. This means that the default index.html generated by the stock builder will not work. I replace index.html with one that only uses all.js.

Example

let ghcjs-optimizer = import ../ghcjs-optimizer { pkgs = nixpkgs; };
 in ghcjs-optimizer hsPkgs.projectCross.ghcjs.hsPkgs.<your project>.components.exes.<your executable>;

I suggest you use niv for nix dependencies like this.