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