Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rwhogg/gulp-flowcheck

A gulp plugin for Flow (DEPRECATED)
https://github.com/rwhogg/gulp-flowcheck

Last synced: about 2 months ago
JSON representation

A gulp plugin for Flow (DEPRECATED)

Awesome Lists containing this project

README

        

# Gulp-Flowcheck

A [gulp](https://gulpjs.com) plugin for [Flow](http://flowtype.org).

[![Build Status](https://travis-ci.org/rwhogg/gulp-flowcheck.svg?branch=master)](https://travis-ci.org/rwhogg/gulp-flowcheck)
[![Code Climate](https://codeclimate.com/github/rwhogg/gulp-flowcheck/badges/gpa.svg)](https://codeclimate.com/github/rwhogg/gulp-flowcheck)

## Installation

```bash
$ npm install --save-dev gulp-flowcheck;
```

## Usage

```js
var GulpFlow = require("gulp-flowcheck");
var gulpFlow = new GulpFlow();

gulp.task("flow", function()
{
gulp.src("*.js")
.pipe(gulpFlow.check())
.pipe(gulpFlow.reporter());
});
```

The default reporter uses a JSON format. You'll probably find `GulpFlow.markdownReporter()` easier to read.
You can also try `GulpFlow.failReporter()`, which does exactly what you think it does.

### Automatically adding `@flow` headers

You can use [gulp-header](https://github.com/godaddy/gulp-header) to add the `@flow` headers to your source code
automatically:

```js
var header = require("gulp-header");

gulp.src("*.js")
.pipe(header("/* @flow */"))
.pipe(gulpFlow.check())
...
```