@ -96,6 +96,10 @@ EOF
|
||||
# yarn to fetch node_modules if necessary without build scripts running.
|
||||
# We cannot use --no-scripts because we still want dependent package scripts to run.
|
||||
jq 'del(.scripts)' < "$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json"
|
||||
|
||||
pushd "$VSCODE_OUT_PATH"
|
||||
symlink_asar
|
||||
popd
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
@ -41,6 +41,19 @@ main() {
|
||||
vscode_yarn() {
|
||||
cd lib/vscode
|
||||
yarn --production --frozen-lockfile
|
||||
|
||||
# VS Code needs a node_modules.asar but that's just a duplicate of stuff we
|
||||
# already have in node_modules.
|
||||
if [ ! -e node_modules.asar ]; then
|
||||
if [ "${WINDIR-}" ]; then
|
||||
# mklink takes the link name first.
|
||||
mklink /J node_modules.asar node_modules
|
||||
else
|
||||
# ln takes the link name second.
|
||||
ln -s node_modules node_modules.asar
|
||||
fi
|
||||
fi
|
||||
|
||||
cd extensions
|
||||
yarn --production --frozen-lockfile
|
||||
for ext in */; do
|
||||
|
14
ci/dev/postinstall.sh
Executable file
14
ci/dev/postinstall.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
main() {
|
||||
cd "$(dirname "$0")/../.."
|
||||
source ./ci/lib.sh
|
||||
|
||||
cd lib/vscode
|
||||
yarn ${CI+--frozen-lockfile}
|
||||
|
||||
symlink_asar
|
||||
}
|
||||
|
||||
main "$@"
|
15
ci/lib.sh
15
ci/lib.sh
@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
pushd() {
|
||||
builtin pushd "$@" > /dev/null
|
||||
@ -93,3 +94,17 @@ export OS
|
||||
# RELEASE_PATH is the destination directory for the release from the root.
|
||||
# Defaults to release
|
||||
RELEASE_PATH="${RELEASE_PATH-release}"
|
||||
|
||||
# Symlink node_modules.asar to node_modules. VS Code needs a node_modules.asar
|
||||
# but that's just a duplicate of stuff we already have in node_modules.
|
||||
symlink_asar() {
|
||||
if [ ! -e node_modules.asar ]; then
|
||||
if [ "${WINDIR-}" ]; then
|
||||
# mklink takes the link name first.
|
||||
mklink /J node_modules.asar node_modules
|
||||
else
|
||||
# ln takes the link name second.
|
||||
ln -s node_modules node_modules.asar
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user