mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-25 11:52:51 +01:00
Use symlink for node_modules (#3830)
This commit is contained in:
parent
a2a8ef7e85
commit
30e46ba64a
2
Makefile
2
Makefile
@ -51,7 +51,7 @@ update-submodules:
|
|||||||
tools/update-submodules.sh
|
tools/update-submodules.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf dist/build
|
rm -rf dist/build tmp/node_modules
|
||||||
|
|
||||||
|
|
||||||
# Not real targets, just convenient for auto-completion at shell prompt
|
# Not real targets, just convenient for auto-completion at shell prompt
|
||||||
|
@ -6,14 +6,8 @@ set -e
|
|||||||
|
|
||||||
DES="dist/build/uBlock0.npm"
|
DES="dist/build/uBlock0.npm"
|
||||||
|
|
||||||
TMPDIR=tmp
|
TMPDIR="$PWD/tmp"
|
||||||
mkdir -p $TMPDIR
|
mkdir -p "$TMPDIR/node_modules"
|
||||||
|
|
||||||
# Save existing npm dependencies if present so that we do not have to fetch
|
|
||||||
# them all again
|
|
||||||
if [ -d "$DES/node_modules" ]; then
|
|
||||||
mv "$DES/node_modules" "$TMPDIR/node_modules"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf $DES
|
rm -rf $DES
|
||||||
|
|
||||||
@ -40,11 +34,7 @@ else
|
|||||||
echo "*** uBlock0.npm: Creating plain package..."
|
echo "*** uBlock0.npm: Creating plain package..."
|
||||||
mv $tarballname ../uBlock0.npm.tgz
|
mv $tarballname ../uBlock0.npm.tgz
|
||||||
fi
|
fi
|
||||||
|
ln -sf "$TMPDIR/node_modules"
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
# Restore saved npm dependencies
|
|
||||||
if [ -d "$TMPDIR/node_modules" ]; then
|
|
||||||
mv "$TMPDIR/node_modules" "$DES/node_modules"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "*** uBlock0.npm: Package done."
|
echo "*** uBlock0.npm: Package done."
|
||||||
|
Loading…
Reference in New Issue
Block a user