activate_node 436 B

1234567891011121314
  1. # Activation script for virtual nodejs environment
  2. # Usage:
  3. # source activate_node
  4. if [ \! -f "./activate_node" ]
  5. then
  6. echo "Not in project directory"
  7. exit 1
  8. fi
  9. vdir="./.venv"
  10. test -x "${vdir}/bin/nodeenv" || ( virtualenv -p python3 "${vdir}" && "${vdir}/bin/pip" install --upgrade nodeenv )
  11. test -e "${vdir}/node/bin/activate" || "${vdir}/bin/nodeenv" --node=10.3.0 --force "${vdir}/node"
  12. source "${vdir}/node/bin/activate"