UNPKG

1.02 kBMarkdownView Raw
1# flow-bin
2
3> Binary wrapper for [Flow](https://flow.org) - A static type checker for JavaScript
4
5macOS (x64), Linux (x64, arm64) and Windows (x64) binaries are currently [provided](https://flow.org/en/docs/install/).
6
7
8## CLI
9
10For Yarn:
11
12```
13$ yarn add --dev flow-bin
14$ yarn run flow --help
15```
16
17For npm, add `{ "scripts": { "flow": "flow" } }` in package.json and run:
18
19```
20$ npm install --save-dev flow-bin
21$ npm run flow --help
22```
23
24
25## API
26
27```
28$ npm install --save flow-bin
29```
30
31```js
32const execFile = require('child_process').execFile;
33const flow = require('flow-bin');
34
35execFile(flow, ['check'], (err, stdout) => {
36 console.log(stdout);
37});
38```
39
40
41## License
42
43flow-bin is MIT-licensed.
44
45
46## Releases
47
48### New Release
49
501. `make push VERSION=0.122.0` (use the same version as Flow)
512. Publish to npm: `make publish` (run `npm adduser` the first time to log in)
52
53### Inspect a Release Before Publishing
54
55```sh
56npm pack
57tar xf "flow-bin-$(node -p 'require("./package.json").version').tgz"
58cd package
59npm run verify
60```