serializer/activate_node
2018-12-30 23:22:16 +01:00

14 lines
431 B
Text

# Activation script for virtual nodejs environment
# Usage:
# source activate_node
if [ \! -f "./activate_node" ]
then
echo "Not in project directory"
exit 1
fi
vdir="./.venv"
test -x "${vdir}/bin/nodeenv" || ( python3 -m venv "${vdir}" && "${vdir}/bin/pip" install --upgrade nodeenv )
test -e "${vdir}/node/bin/activate" || "${vdir}/bin/nodeenv" --node=10.15.0 --force "${vdir}/node"
source "${vdir}/node/bin/activate"