GithubHelp home page GithubHelp logo

rmoorman / reason Goto Github PK

View Code? Open in Web Editor NEW

This project forked from reasonml/reason

0.0 2.0 0.0 16.54 MB

Friendly Syntax & Toolchain Powered by OCaml

Home Page: http://facebook.github.io/reason

License: Other

Makefile 0.44% OCaml 82.72% Shell 2.88% Vim Script 2.41% Emacs Lisp 10.25% Python 0.26% C++ 0.03% Roff 0.90% Standard ML 0.11%

reason's Introduction

Reason: Build Systems Rapidly Build Status CircleCI

  • Approachable syntax.
  • Powerful, automatic source code formatting.
  • Adopt incrementally with JavaScript/C interop.
  • Ahead-of-time compilation to assembly - without a language level VM.
  • Rapidly develop and share projects.

Install Via npm

npm version > 3.0 is required - install here.

Reason Project

Installing the ReasonProject starter kit using npm is the easiest way to get started with Reason. It will install the master Reason branch and all of the dependencies for you into a local directory based sandbox. It even includes the compiler, IDE support, and REPL. Simply delete the directory when you're done and it's gone from your computer.

git clone https://github.com/reasonml/ReasonProject.git
cd ReasonProject
npm install
npm start

While it's installing, read about how to use ReasonProject to compile your simple project and use its built-in editor support and top level.

Rebel

The ReasonProject uses a very simple build system called rebuild that comes with Reason, and is enough to start a small project. For large-scale development, we are currently developing a build and namespacing workflow called rebel, which is built on jenga. It is an early work in progress, but you can also try it out via RebelExampleProject. rebel currently takes a long time to compile the first time it's used, so for getting started quickly, use ReasonProject instead.

rebel features:

  • Easy to use bucklescript integration.
  • Easy to use js_of_ocaml integration.
  • Automatic namespacing based on your package.json package name.
  • Automatic generation of .merlin files.
  • Powered by jenga, a fast, parallel, recoverable build system.
  • Uses modern compiler features such as "module aliases" for faster compilation of projects.

Installing via OPAM

The OPAM installation doesn't use the isolated directory based sandbox model that ExampleProject does, but if you are very familiar with opam, you should be able to work out conflicts in the global switch, or create a new switch for the purpose of using Reason.

# On OSX, install opam via Homebrew:
brew update
brew install opam
# On Linux, see here (you will need opam >= 1.2.2): http://opam.ocaml.org/doc/Install.html

opam init
# Add this to your ~/.bashrc (or ~/.zshrc):
#   eval $(opam config env)

opam update
opam switch 4.02.3
eval $(opam config env)
opam install reason

Testing OPAM installation.

Test the installation by compiling the following program:

echo 'print_string "Hello world"' > Hello.re

rebuild Hello.native # Automatically generates Hello.native from Hello.re

./Hello.native

Get Started Now

Check out the docs which guide you through the basic syntax and toolchain features.

Contribute back to that documentation in the docs folder.

Community

Get in touch! We're on IRC freenode #reasonml, and Discord.

Contributing To Development

# On OSX, install opam via Homebrew:
brew update
brew install opam
# On Linux, see here (you will need opam >= 1.2.2): http://opam.ocaml.org/doc/Install.html

opam init
# Add this to your ~/.bashrc (or ~/.zshrc):
#   eval $(opam config env)

opam update
opam switch 4.03.0
eval $(opam config env)
git clone [email protected]:facebook/reason.git
cd reason
opam pin add -y reason-parser reason-parser
opam pin add -y reason .

Note: during the last opam pin step, make sure your local repo is clean. In particular, remove artifacts and node_modules. Otherwise the pinning might go stale or stall due to the big node_modules.

License

See Reason license in LICENSE.txt.

Works that are forked from other projects are under their original licenses.

Editor plugins (which have also been forked) in the editorSupport/ directory include their own licenses.

reason's People

Contributors

jordwalke avatar chenglou avatar yunxing avatar sanderspies avatar let-def avatar tekknolagi avatar freebroccolo avatar kayceesrk avatar cristianoc avatar iwankaramazow avatar bsansouci avatar pvolok avatar dxu avatar vramana avatar kassens avatar sansthesis avatar rickyvetter avatar tadeuzagallo avatar avsm avatar ngzhian avatar schmavery avatar jberdine avatar jaredly avatar yutongp avatar rubas avatar dchambers avatar quicksnap avatar anmonteiro avatar kyleamathews avatar lucasqiu avatar

Watchers

Rico Moorman 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.