npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-flowtype-opensrcken

v1.0.9

Published

Run Facebook's Flow in your gulp pipeline

Downloads

37

Readme

About this fork

  • Enables the flow type-checking of directories. Flow's binary is optimized for taking directories as input. Leveraging this can dramatically improve performance over the original repository, for larger codebases.
  • Uses textual output rather than JSON output, so error output is not truncated.
  • Removes outdated options that flow no longer supports.
  • Removed the abort option, effectively making it the default behavior.

gulp-flowtype Build Status NPM version Dependency Status Gitter chat

Run Facebook's Flow in your gulp pipeline

gulp-flowtype example

Installation

$ npm install --save-dev gulp-flowtype

Running Windows?

Flow hasn't provided an official binary as of yet, you can follow the issue here #6.

If you do manage to compile flow and get it running. You can set the path to your own executable using an environment variable.

$ set FLOW_BIN=/path/to/flow

Usage

var react = require('gulp-react');
var flow = require('gulp-flowtype');

gulp.task('typecheck', function() {
  return gulp.src('./*.js')
    .pipe(flow({
        all: false,
        weak: false,
        declarations: './declarations',
        killFlow: false,
        beep: true,
        abort: false
    }))
    .pipe(react({ stripTypes: true })) // Strip Flow type annotations before compiling
    .pipe(gulp.dest('./out'));
});

Options

options.killFlow

Type: Boolean Default: false

Kills the Flow server after Typecheck is finished.

options.beep

Type: Boolean Default: true

Notify your command prompt of a Typecheck error with a beep

options.reporter

Type: function Default: sindresorhus/jshint-stylish

Optionally specify a custom reporter. This needs to conform to the specifications in http://jshint.com/docs/reporters/

Release History

  • 2016-07-05 v1.0.0 [Improvement] Forked. Update code to reflect latest version of Flow. Ensure full output is shown, by using textual rather than JSON output. Abort the gulp task by default when there is a compilation error.
  • 2016-01-18 v0.4.9 [Improvement] Update dependencies + fix broken code #38
  • 2015-09-13 v0.4.8 [Fix] Downgrade flow
  • 2015-05-05 v0.4.7 [Improvement] Add option for custom reporter
  • 2015-04-10 v0.4.6 [Fix] Move flow-bin to peerDependencies + #25 Fix abort option
  • 2015-02-24 v0.4.5 [Bump] flow-bin v0.4.0
  • 2015-02-15 v0.4.4 [Fix] #19 Reset passed value when finished
  • 2015-02-07 v0.4.3 [Fix] Move dependency from devDependencies to dependencies
  • 2015-02-06 v0.4.2 [Improvement] Add beep, abort on error and option to override flow executable (broken)
  • 2014-12-15 v0.4.1 [Improvement] Performance improvements & better error handling
  • 2014-11-26 v0.4.0 [Improvement] Tweak success message, check file has /* @flow */ before running flow and added options
  • 2014-11-23 v0.3.1 [Fix] Changes to previous formatting fix
  • 2014-11-23 v0.3.0 [Fix] Repair formatting issues
  • 2014-11-21 v0.2.0 [Improvement] General improvements
  • 2014-11-19 v0.1.0 Initial release

Contributing

  1. Write test (if applicable)
  2. Write code
  3. Make tests pass
  4. Execute npm run lint and make amendments if needed
  5. Create pull request
  6. Rinse and repeat

License

MIT © Charlie Dowler