serializer/activate_node

15 lines
431 B
Plaintext
Raw Normal View History

2018-12-30 22:22:16 +00:00
# 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"