deno2.nix/nix/mk-bundled-wrapper.nix
SnO₂WMaN 21efd7ac82
feat: Update for deno2nix v2 (#21)
* move simple script to `examples/simple`

* rm vscode settings.json

* example npm

* wip

* refactoring

* Update mkExecutable

* rm custom formatter  from vscode extensions

* Add .gitignore

* Update flake.nix

* bundled/executable wip

* Update flake

* importMap

* bundled wrapper

* somerefactoring

* no more overlay(default)

* add todo

* Update README.md
2022-12-14 13:00:56 +09:00

20 lines
348 B
Nix

{
lib,
deno,
deno2nix,
writeShellScriptBin,
...
}: {
pname,
bin ? pname,
output ? "${pname}.bundled.js",
outPath ? "dist",
...
} @ args: let
inherit (lib) filterAttrs;
bundled = deno2nix.mkBundled (filterAttrs (n: v: n != "bin") args);
in
writeShellScriptBin
bin
"${deno}/bin/deno run ${bundled}/${outPath}/${output}"