Skip to content

Commit

Permalink
Copy src/**file.js to lib/**file.js.flow for auto-exporting flow …
Browse files Browse the repository at this point in the history
…annotations

Describe classes via `flow-typed` is too lazy and it may stale with time. 
The moreover types are already in the code. So let export them, like it done in `graphql-js`.
Related: graphql/graphql-js#412
  • Loading branch information
nodkz committed May 29, 2017
1 parent c3a1812 commit fcefac0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"main": "lib/EventEmitter.js",
"repository": "facebook/emitter",
"scripts": {
"build": "gulp build",
"build": "gulp build && npm run build-dot-flow",
"build-dot-flow": "find ./src -name '*.js' -not -path '*/__tests__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done",
"prepublish": "npm run build",
"test": "NODE_ENV=test jest"
},
Expand Down

0 comments on commit fcefac0

Please sign in to comment.