GithubHelp home page GithubHelp logo

enaqx / flow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebook/flow

1.0 3.0 3.0 152.15 MB

Adds static typing to JavaScript to improve developer productivity and code quality.

Home Page: http://flowtype.org/

License: Other

Makefile 0.27% Emacs Lisp 0.08% OCaml 59.10% C 2.57% Standard ML 0.18% JavaScript 35.06% Batchfile 0.04% PowerShell 0.06% Shell 0.97% Python 0.02% Ruby 0.80% CSS 0.54% HTML 0.30%

flow's Introduction

Flow Build Status Windows Build status

Flow is a static typechecker for JavaScript. To find out more about Flow, check out flowtype.org.

For a background on the project, please read our launch blog post.

Requirements

Flow works with:

  • Mac OS X
  • Linux (64-bit)

There are binary distributions for Mac OS X and many variants of Linux; you can also build it from source on almost any 64-bit Linux variant.

Building Flow

Flow is written in OCaml (OCaml 4.01.0 or higher is required) and (on Linux) requires libelf. You can install OCaml on Mac OS X and Linux by following the instructions at ocaml.org.

For example, on Ubuntu 14.04 and similar systems:

sudo apt-get install ocaml libelf-dev

On OSX, using the brew package manager:

brew install ocaml ocamlbuild libelf opam

Once you have these dependencies, building Flow just requires running

make

This produces a bin folder containing the flow binary.

Note: at this time, the OCaml dependency prevents us from adding Flow to npm. Try flow-bin if you need a npm binary wrapper.

Running the tests

To run the tests, first compile flow using make. Then run bash ./runtests.sh bin/flow

There is a make test target that compiles and runs tests.

To run a subset of the tests you can pass a second argument to the runtests.sh file.

For example: bash runtests.sh bin/flow class | grep -v 'SKIP'

Installing Flow

Flow is simple to install: all you need is the flow binary on your PATH and you're good to go.

Using Homebrew

Installing Flow with Homebrew package manager:

brew install flow

Using OPAM

You can also build and install flow via the OCaml OPAM package manager. Since Flow has some non-ocaml dependencies, you need to use the depext package like so:

opam install depext
opam depext --install flowtype

If you don't have a new enough version of OCaml to compile Flow, you can also use OPAM to bootstrap a modern version. Install OPAM via the binary packages for your operating system and run:

opam init --comp=4.01.0
opam install flowtype
eval `opam config env`
flow --help

Documentation

Check out http://flowtype.org for documentation and examples.

Join the Flow community

License

Flow is BSD-licensed. We also provide an additional patent grant.

flow's People

Contributors

alexchow avatar andrewjkennedy avatar avikchaudhuri avatar bhosmer avatar dabek avatar dlreeves avatar dsereni avatar ericlippert avatar eyyub avatar gabelevi avatar gyzerok avatar hansonw avatar hnrgrgr avatar int3 avatar jamesgpearce avatar jeffmo avatar joelmarcey avatar jwatzman avatar karelbilek avatar marudor avatar mbouaziz avatar mroch avatar msullivan avatar nmote avatar phooji avatar popham avatar rsolomo avatar samwgoldman avatar shixiao avatar vjeux avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.