[](https://www.npmjs.com/package/gen-flow-files) [](https://www.npmjs.com/package/gen-flow-files)
npm install gen-flow-files

This is a script which finds .js files with @flow annotation, extract flow definitions and save to specific folder.
As example,
``javascript
// @flow
extract function foo(arg1: number, arg2: string): string {
// some code here
}
`
will be transformed to :`javascript
// @flow
declare extract function foo(arg1: number, arg2: string): string;
`
alt="Sponsored by Lessmess" width="236" height="54">
Install it with yarn:
``
yarn add gen-flow-files
Or with npm:
``
npm i gen-flow-files --save
`json`
scripts": {
...
"flow": "flow",
"build:flow": "gen-flow-files src --out-dir dist",
...
},src
transfrom all .js files from to .js.flow files and save them at dist.
#### As command
``
npx gen-flow-files
transfrom all .js files from to .js.flow files and save them at