Sunday 15 November 2015

Common practice request; BabelJS, Heroku

I'm evaluating Heroku, a first timer here. I'm generally fond of transpiling my src using BabelJS, enabling me to future proof (read: use the fun stuff) my projects. Here's my general setup:package.json{ "main": "build/index.js", "engines": { "node": "4.2.2" }, "scripts": { "build": "babel -d build/ src/", "postinstall": "npm run build" }, "dependencies": { ... }, "devDependencies": { "babel-cli": "^6.0.0", ... } } But this will not compile on Heroku as they install for production, as expected. Easily solvable by just moving the dependencies out of dev, or committing my build/ into repo - however, I'd like to avoid both. I do not like having the build in repo, and I do not like having dev-dependencies specified as dependencies.How do you do it?I also realise this is bike-shedding, but it's a pet peeve of mine so I figured I'd ask.

Submitted November 14, 2015 at 11:17PM by fl0w_io

No comments:

Post a Comment