batavia
batavia copied to clipboard
Put npm into the virtualenv (doc issue)
I suspect this may be an improvement to workflow, at least for contributors: https://lincolnloop.com/blog/installing-nodejs-and-npm-python-virtualenv/
Amirite?
Ooh - yes. And possibly even better, @elbaschid's virtual-node - a pip installable node.js.
(although from the look of it, that project might need an update...)
Haha, that's very true. I haven't used it myself for a while and since I'm mostly Python 3 now, it doesn't really work anymore 😢 . But I'm happy to push an update if that is just a version bump of node or something.
I've been using nodeenv successfully. Although its docs say "python 2.6 or 2.7", it does support Python 3. nodeenv is itself pip-installable, and then you can use it to install node into the virtualenv using nodeenv -p
.
Looking at virtual-node, it mentions nodeenv as a source which it adapted -- except it seems that nodeenv has advanced significantly since then, and virtual-node hasn't.
So, my "get started guide" says:
mkvirtualenv batavia
pip install nodeenv cricket
nodeenv -p
npm install
npm run build
cricket-unittest