Skip to content

Commit

Permalink
Merge pull request #4 from serokell/rvem/compress-js-code
Browse files Browse the repository at this point in the history
[Chore] Compress JS code using 'closure-compiler'
  • Loading branch information
rvem authored Sep 18, 2024
2 parents 6dd7bb9 + f99df48 commit a0b4e5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- name: build nixfmt-js
run: nix build .#nixfmt-js

- name: build webdemo
run: nix build .#nixfmt-webdemo

deploy:
runs-on: [self-hosted, nix]
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
mkdir $out
cp ${./js/index.html} $out/index.html
cp ${./js/404.html} $out/404.html
cp ${self.packages.${system}.nixfmt-js}/bin/js-interface $out/nixfmt.js
${pkgs.closurecompiler}/bin/closure-compiler --assume_function_wrapper \
--js ${self.packages.${system}.nixfmt-js}/bin/js-interface \
--js_output_file $out/nixfmt.js
'';
inherit (pkgs) awscli;
};
Expand Down

0 comments on commit a0b4e5e

Please sign in to comment.