I am deploying a Node.js application on Heroku. My production deployment is based on a Grunt task that minifies js and css files, placing them in a /dist folder from which they are called.
How can I add this step on the Heroku deployment?
I am deploying a Node.js application on Heroku. My production deployment is based on a Grunt task that minifies js and css files, placing them in a /dist folder from which they are called.
How can I add this step on the Heroku deployment?
Use a postinstall
script, as outlined in Heroku's DevCenter docs for node:
eg:
"scripts": {
"postinstall": "grunt uglify",
"start": "node server.js"
}