Skip to content

Commit 91fa259

Browse files
committed
Add build steps
This commit adds two new commands, `npm run generate` and `npm run build`. The former runs the commands for auto-generating Flow, JSDoc, and TypeScript type declarations. The latter runs the auto-generation commands, typechecks the source according to the auto-generated type declarations, and finally generates JSDoc documentation.
1 parent 7ddfa6f commit 91fa259

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
language: node_js
22
node_js:
3-
- "0.10"
3+
- 6
4+
script: npm run build

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@
1212
"jsdoc": "^3.4.3",
1313
"jsondiffpatch": "0.1.43",
1414
"mocha": "3.0.2",
15+
"rimraf": "^2.5.4",
1516
"typescript": "^2.1.4"
1617
},
1718
"scripts": {
19+
"build": "npm run clean && npm run generate && npm run typecheck && npm test && npm run docs",
20+
"clean": "rimraf decls index.d.ts lib/types.js",
1821
"docs": "jsdoc -p -r lib -t ./node_modules/docdash -R README.md",
22+
"generate": "npm run generate-flow && npm run generate-jsdoc && npm run generate-typescript",
1923
"generate-flow": "node scripts/flow.js webidl2.idl decls",
2024
"generate-jsdoc": "node scripts/jsdoc.js webidl2.idl >lib/types.js",
2125
"generate-typescript": "node scripts/typescript.js webidl2.idl >index.d.ts",

0 commit comments

Comments
 (0)