21efd7ac82
* 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
20 lines
348 B
Nix
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}"
|