heroku-postbuild npm run build code example

Example: heroku scripts

// When pushing to heroku and it finds a package.json file in the root folder,
// the following npm scripts are gonna be executed:

"scripts": {
  "heroku-prebuild": "echo This runs before Heroku installs dependencies.",
  "build": "echo This won't run when there's a heroku-postbuild script. Otherwise it runs instead.",
  "heroku-postbuild": "echo This runs after Heroku installs dependencies, but before Heroku prunes and caches dependencies.",
  "heroku-cleanup": "echo This runs after Heroku prunes and caches dependencies.",
  "start": "echo You can specify you start script here."
}