crosscode: envtpl as .cjs (Node CommonJS for the root lint)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 13:26:00 +02:00
co-authored by Claude Opus 5.5
parent d61b3e5978
commit 92869d2683
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ env_apply() {
shift 3
local -a conf=()
[ -n "$CROSSCODE_CONFIG" ] && conf=(--config "$CROSSCODE_CONFIG")
node "$CROSSCODE_HOME/lib/envtpl.js" --template "$(env_template "$app" "$product")" --dir "$app" \
node "$CROSSCODE_HOME/lib/envtpl.cjs" --template "$(env_template "$app" "$product")" --dir "$app" \
--product "$product" --release "$release" "${conf[@]+"${conf[@]}"}" "$@"
}
@@ -45,7 +45,7 @@ env_apply_template() {
shift 4
local -a conf=()
[ -n "$CROSSCODE_CONFIG" ] && conf=(--config "$CROSSCODE_CONFIG")
node "$CROSSCODE_HOME/lib/envtpl.js" --template "$tpl" --dir "$app" \
node "$CROSSCODE_HOME/lib/envtpl.cjs" --template "$tpl" --dir "$app" \
--product "$product" --release "$release" "${conf[@]+"${conf[@]}"}" "$@"
}
@@ -4,7 +4,7 @@
// and `crosscode deploy` (files exist: only variables they don't have are appended, with a
// comment; existing lines are never changed or removed).
//
// node envtpl.js --template <file> --dir <product dir> [--config <job config JSON>]
// node envtpl.cjs --template <file> --dir <product dir> [--config <job config JSON>]
// [--product events] [--var domain=… --var apiPort=…] [--fallback NAME=value]
// [--release events@x.y.z] [--check]
//