Here we use npm-run-script to install dependent packages and build.
npm run install-grunt-cli
npm run install-dev
npm run build
The commands above are defined in package.json
"scripts": {
"install-grunt-cli": "npm install -g grunt-cli",
"install-dev": "npm install --only=dev",
"build": "grunt default"
}