flow-up
Version:
Easily add flowtype to your codebase
72 lines (46 loc) • 1.23 kB
Markdown
# flow-up
*Easy `flowtype`ing.*
> `JSON` configuration for flow. `@flow` pragma writing to your files. Easy `flowtype`ing.
## Install
```
$ npm install --save-dev flow-up
```
*Or if you're using `Yarn`:*
```
$ yarn add flow-up --dev
```
## Usage
```
flowup [opts] [filename ...]
```
In real world, it'd look something like:
```
flowup --pragma "src/**/*js"
```
> NOTE: Don't forget to wrap globs in quotes. Look for valid glob patters [here](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer).
### Options
`Flowup` has got minimal options at present:
#### --config, --no-config
**Syntax** : `flowup --config`
Writes `.flowconfig` at the project root based on flow config provided in `package.json` file. Typically as:
```json
{
"flow": {
"include": ["src", "app"],
"ignore": ["node_modules"]
}
}
```
#### --pragma, --no-pragma
**Syntax** : `flowup --pragma <file-glob>`
Tests for flow pragma in the files that match the glob pattern you provide. If not found, it'll add it to the file.
#### Defaults
`config:` `true`
`pragma:` `false`
## Todo
- Test cases
- Run flow (`flow-bin`) from `flowup`
- Smarter flow pragma additions
- More options
## License
MIT © Yatharth Khatri