diff options
Diffstat (limited to 'scripts/code-web.sh')
-rwxr-xr-x | scripts/code-web.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/code-web.sh b/scripts/code-web.sh new file mode 100755 index 00000000000..dd32d01117e --- /dev/null +++ b/scripts/code-web.sh @@ -0,0 +1,24 @@ +#!/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 + yarn download-builtin-extensions + + # Load remote node + yarn gulp node + + NODE=$(node build/lib/node.js) + + $NODE ./resources/web/bin-dev/code-web-playground.js "$@" +} + +code "$@" |