Skip to content

Commit

Permalink
In deno-app-compile: add support for transpile arg
Browse files Browse the repository at this point in the history
  • Loading branch information
nktpro committed May 1, 2024
1 parent 022e57c commit 6c4add7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/deno-app-compile.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
, src
, appSrcPath
, additionalSrcPaths ? { }
, denoCompileFlags ? "--no-config --no-lock --no-prompt --no-remote --cached-only -A"
, transpile ? false
, denoCompileFlags ? (if transpile then "--no-config --no-lock --no-prompt --no-remote --cached-only -A" else "--cached-only -A")
, stdenv
, makeWrapper
, deno
Expand All @@ -18,7 +19,11 @@
}:
let
generateBuildCommands = outputVarName: srcPath: ''
${outputVarName}=$(${deno-app-build}/bin/deno-app-build --allow-npm-specifier --app-path="${srcPath}" --out-path="$TEMP_OUT") || exit $?
${outputVarName}=${if transpile then
''$(${deno-app-build}/bin/deno-app-build --allow-npm-specifier --app-path="${srcPath}" --out-path="$TEMP_OUT") || exit $?''
else
''"${srcPath}"''}
${if prefix-patch != null then ''
PATCHED_${outputVarName}=$(mktemp)
cat ${prefix-patch} > "$PATCHED_${outputVarName}"
Expand Down

0 comments on commit 6c4add7

Please sign in to comment.