Skip to content

Instantly share code, notes, and snippets.

@yousifalraheem
Last active June 14, 2020 08:38
Show Gist options
  • Save yousifalraheem/403f27289d76ee625904ffb3457290ea to your computer and use it in GitHub Desktop.
Save yousifalraheem/403f27289d76ee625904ffb3457290ea to your computer and use it in GitHub Desktop.
NPM Package scripts cleaned up using pre and post hooks
{
"scripts": {
"lint": "tslint -p tsconfig.json",
"pretest": "rimraf converage",
"test": "jest",
"prebuild:prod": "npm run lint && npm test",
"build:prod": "webpack - mode production",
"prebuild": "rimraf dist",
"build": "npm run build:prod",
"postbuild": "npm run deploy",
"deploy": "gh-pages -d dist"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment