Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created February 14, 2019 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hubgit/7cfe5e83c645de8c00e30470eef57a26 to your computer and use it in GitHub Desktop.
Save hubgit/7cfe5e83c645de8c00e30470eef57a26 to your computer and use it in GitHub Desktop.
npm scripts for typescript libraries
"scripts": {
"build": "npm-run-all --parallel build:*",
"build:cjs": "tsc --outDir dist/cjs --module commonjs",
"build:es": "tsc --outDir dist/es --declarationDir dist/types --declaration",
"dev": "npm-run-all --parallel \"build:* --watch\"",
"lint": "tslint --project .",
"prebuild": "rimraf dist",
"prettier": "prettier --write \"src/**/*.{ts,tsx}\" \"*.{js,json}\"",
"preversion": "npm-run-all --parallel typecheck lint test",
"test": "jest",
"typecheck": "tsc --noEmit",
"version": "yarn build"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment