You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
285 B
Bash
16 lines
285 B
Bash
10 years ago
|
#!/bin/bash
|
||
|
#
|
||
|
# Switch a dependency to NPM.
|
||
|
# Remove the symlink and install from NPM.
|
||
|
|
||
|
DEP_NAME=$1
|
||
|
SCRIPT_DIR=$(dirname $0)
|
||
|
cd $SCRIPT_DIR/..
|
||
|
|
||
|
if [ ! -L ./node_modules/$DEP_NAME ]; then
|
||
|
echo "$DEP_NAME is not a symlink"
|
||
|
else
|
||
|
rm ./node_modules/$DEP_NAME
|
||
|
npm install $DEP_NAME
|
||
|
fi
|