Files
wehub-resource-sync fdedcf53bb
Basic checks / Compilation, Unit and Integration Tests (push) Waiting to run
Basic checks / Hygiene and Layering (push) Waiting to run
Basic checks / Warm up node modules cache (push) Waiting to run
Check Format and Lint / lint-and-format (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 12:36:35 +08:00

28 lines
503 B
Bash
Executable File

#!/usr/bin/env bash
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
ROOT=$(dirname $(dirname $(realpath "$0")))
else
ROOT=$(dirname $(dirname $(readlink -f $0)))
fi
function code() {
cd $ROOT
# Sync built-in extensions
npm run download-builtin-extensions
NODE=$(node build/lib/node.js)
if [ ! -e $NODE ];then
# Load remote node
npm run gulp node
fi
NODE=$(node build/lib/node.js)
$NODE ./scripts/code-web.js "$@"
}
code "$@"