Install all npm modules before build, then npm prune --production to remove development dependencies.
Notes:
With this change comes the recommendation that the default package.json lists lineman in devDependencies.
the --production flag to npm prune is ignored before 1.3.10, so the slug will contain all the development dependencies. Setting {"engines": {"node":"~>1.3.11"}} in package.json will tell heroku to use that version.
This leaves the node runtime in tact so a custom Procfile can be specified that runs a node server. Motivation for this change can be found here: https://github.com/bkeepers/github-notifications/pull/21
Changes:
www
npm prune --production
to remove development dependencies.Notes:
package.json
lists lineman indevDependencies
.--production
flag tonpm prune
is ignored before1.3.10
, so the slug will contain all the development dependencies. Setting{"engines": {"node":"~>1.3.11"}}
inpackage.json
will tell heroku to use that version.