Archived
1
0

Hide bundled node_modules to prevent them from being ignored

This commit is contained in:
Anmol Sethi
2020-05-13 04:17:34 -04:00
parent d30f3dbdf7
commit b3ae4d67d3
5 changed files with 44 additions and 10 deletions

21
ci/build/npm-postinstall.sh Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env sh
set -eu
main() {
cd lib/vscode
# We have to rename node_modules.bundled to node_modules.
# The bundled modules were renamed originally to avoid being ignored by yarn.
local node_modules
node_modules="$(find . -depth -name "node_modules.bundled")"
local nm
for nm in $node_modules; do
rm -Rf "${nm%.bundled}"
mv "$nm" "${nm%.bundled}"
done
# Rebuilds native modules.
npm rebuild
}
main "$@"