Skip to content

Commit

Permalink
Adds a production build tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Sep 19, 2017
1 parent dbfc14a commit 65bb087
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
},
"scripts": {
"precommit": "lint-staged",
"prepush": "npm run build",
"prepush": "yarn run build",
"test": "jest",
"test:watch": "jest --watch",
"lint": "tslint \"source/**/*.ts\"",
"lint:fix": "tslint \"source/**/*.ts\" --fix",
"prepublishOnly": "npm run build && yarn declarations",
"build": "shx rm -rf ./distribution && tsc && madge ./distribution --circular",
"prepublishOnly": "yarn run build && yarn declarations",
"build": "shx rm -rf ./distribution && tsc -p tsconfig.production.json && madge ./distribution --circular",
"build:watch": "tsc -w",
"link": "npm run build && chmod +x distribution/commands/danger.js && npm link",
"link": "yarn run build && chmod +x distribution/commands/danger.js && npm link",
"declarations": "ts-node ./scripts/create-danger-dts.ts",
"docs:cp_defs":
"mkdir docs/docs_generate; cp source/danger.d.ts docs/docs_generate; cp node_modules/github/lib/index.d.ts docs/docs_generate/github.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"module": "commonjs",
"moduleResolution": "node",
"pretty": true,
"target": "es2015",
"target": "es5",
"outDir": "distribution",
"lib": ["es5", "es2017"]
},
Expand Down
12 changes: 12 additions & 0 deletions tsconfig.production.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"exclude": [
"dangerfile.ts",
"scripts",
"node_modules",
"source/**/fixtures/*",
"source/**/_tests/*",
"distribution",
"types"
]
}

0 comments on commit 65bb087

Please sign in to comment.