Skip to content

Commit

Permalink
Add build steps
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
markandrus committed Jan 12, 2017
1 parent 7ddfa6f commit 91fa259
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
language: node_js
node_js:
- "0.10"
- 6
script: npm run build
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
"jsdoc": "^3.4.3",
"jsondiffpatch": "0.1.43",
"mocha": "3.0.2",
"rimraf": "^2.5.4",
"typescript": "^2.1.4"
},
"scripts": {
"build": "npm run clean && npm run generate && npm run typecheck && npm test && npm run docs",
"clean": "rimraf decls index.d.ts lib/types.js",
"docs": "jsdoc -p -r lib -t ./node_modules/docdash -R README.md",
"generate": "npm run generate-flow && npm run generate-jsdoc && npm run generate-typescript",
"generate-flow": "node scripts/flow.js webidl2.idl decls",
"generate-jsdoc": "node scripts/jsdoc.js webidl2.idl >lib/types.js",
"generate-typescript": "node scripts/typescript.js webidl2.idl >index.d.ts",
Expand Down

0 comments on commit 91fa259

Please sign in to comment.