{"id":7965,"date":"2015-11-13T01:38:54","date_gmt":"2015-11-13T01:38:54","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/13\/facebook-flow\/"},"modified":"2015-11-13T01:38:54","modified_gmt":"2015-11-13T01:38:54","slug":"facebook-flow","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/13\/facebook-flow\/","title":{"rendered":"facebook\/flow"},"content":{"rendered":"<p>Flow is a static typechecker for JavaScript. To find out more about Flow, check out flowtype.org.<\/p>\n<p>For a background on the project, please read our launch blog post.<\/p>\n<h2>Requirements<\/h2>\n<p>Flow works with:<\/p>\n<p>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.<\/p>\n<h2>Building Flow<\/h2>\n<p>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.<\/p>\n<p>Once you have these dependencies, building Flow just requires running<\/p>\n<pre><code>make\n<\/code><\/pre>\n<p>This produces a <code>bin<\/code> folder containing the <code>flow<\/code> binary.<\/p>\n<p><em>Note: at this time, the OCaml dependency prevents us from adding Flow to npm. Try flow-bin if you need a npm binary wrapper.<\/em><\/p>\n<h2>Running the tests<\/h2>\n<p>To run the tests first compile flow using <code>make<\/code>. Then run <code>bash .\/runtests.sh bin\/flow<\/code><\/p>\n<p>There is a <code>make test<\/code> target that compiles and runs tests.<\/p>\n<p>To run a subset of the tests you can pass a second argument to the <code>runtests.sh<\/code> file.<\/p>\n<p>For example: <code>bash runtests.sh bin\/flow class | grep -v 'Skipping directory'<\/code><\/p>\n<h2>Installing Flow<\/h2>\n<p>Flow is simple to install: all you need is the <code>flow<\/code> binary on your PATH and you\u2019re good to go.<\/p>\n<h2>Using OPAM<\/h2>\n<p>You can also build and install flow via the OCaml OPAM package manager with one command:<\/p>\n<pre><code>opam install flowtype\n<\/code><\/pre>\n<p>If you don\u2019t 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:<\/p>\n<pre><code>opam init --comp=4.01.0\nopam install flowtype\neval `opam config env`\nflow --help\n<\/code><\/pre>\n<h2>Documentation<\/h2>\n<p>Check out http:\/\/flowtype.org for documentation and examples.<\/p>\n<h2>Join the Flow community<\/h2>\n<ul>\n<li>Website: http:\/\/flowtype.org\/<\/li>\n<li>irc: #flowtype on Freenode<\/li>\n<li>Twitter: @flowtype and #flowtype to keep up with the latest Flow news.<\/li>\n<\/ul>\n<h2>License<\/h2>\n<p>Flow is BSD-licensed. We also provide an additional patent grant.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: There are binary distributions for Mac OS X and many variants of Linux; you can also build it from source on almost any [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7965","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7965"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7965\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}