diff options
author | lassulus <lassulus@lassul.us> | 2018-09-23 13:05:11 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-09-23 13:11:50 +0200 |
commit | 79ab2c27f9d7903ff3ed9bcd8de493b1191bbc12 (patch) | |
tree | 0a6fa22ad13a1597bd0d796bc74a388f3da6d0c5 /examples/simple.nix | |
parent | 3212b4fbfb6fff4a1f133b9e18b84f298c6da65d (diff) |
pkgs: add writeJS{,Bin}v2.2.0lass/masterlass/ciderp2
Diffstat (limited to 'examples/simple.nix')
-rw-r--r-- | examples/simple.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/simple.nix b/examples/simple.nix index 0284bf1..55ccedc 100644 --- a/examples/simple.nix +++ b/examples/simple.nix @@ -14,6 +14,12 @@ in { main :: IO () main = print Rolf ''; + js = pkgs.writeJS "example-js" { deps = [ pkgs.nodePackages.uglify-js ]; } '' + var UglifyJS = require("uglify-js"); + var code = "function add(first, second) { return first + second; }"; + var result = UglifyJS.minify(code); + console.log(result.code); + ''; perl = pkgs.writePerl "simple.pl" { deps = [ pkgs.perlPackages.boolean ]; } '' use boolean; print "Howdy!\n" if true; |