GithubHelp home page GithubHelp logo

jichang / fable Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fable-compiler/fable

0.0 2.0 0.0 56.45 MB

F# to JavaScript Compiler

Home Page: http://fable.io/

License: MIT License

Batchfile 0.01% F# 83.61% Shell 0.07% JavaScript 7.18% TypeScript 9.13%

fable's Introduction

F# |> BABEL

The compiler that emits JavaScript you can be proud of!

Mono Build Status .NET Build Status NuGet Status Join the chat at https://gitter.im/fable-compiler/Fable

RELEASE NOTES · Follow us on Twitter!

Fable is an F# to JavaScript compiler powered by Babel, designed to produce readable and standard code. Check the website for more information and if you find the project useful, don't forget to give us a star!

Getting started

Building

Make sure the following requirements are installed in your system:

Then you just need to type ./build.cmd or ./build.sh depending on your system to build a local copy of Fable and run the test suite. After that, if you want to quickly try changes to Fable source, please check src/tools/QuickTest.fs.

Using your local build in your projects

Many of you are making really useful contributions that you also need for your own projects, however a new release may take several days. If you need the latest features the easiest way is to use dotnet run that will automatically build and run Fable based on latest code. For this, in macOS/Linux you can write a fable-next script as follows:

#!/bin/sh

dotnet --version
dotnet run -c Release -p /Users/alfonso/Fable/src/dotnet/Fable.Compiler $@ --force-pkgs

Note you need the full path to Fable.Compiler. The --force-pkgs option is used to force a new copy of package sources (including fable-core) in the hidden .fable folder.

Make it executable (chmod +x fable-next) and put it somewhere included in your PATH (e.g. in macOS /usr/local/bin). Then in your projects, instead of running dotnet fable webpack-dev-server, use fable-next webpack-dev-server.

In Windows, you would write a fable-next.cmd script as follows:

dotnet --version
dotnet run -c Release -p C:\Users\alfonso\Documents\Fable\src\dotnet\Fable.Compiler %* --force-pkgs

ATTENTION: Remember to build fable-core JS files beforehand. This can be done just by building the whole project (see "Building" above) or running the FableCoreJs FAKE target (after this, if you edit one of the src/js/fablecore JS or TS files, you can run the FableCoreJsTypescriptOnly which is faster).

Contributing

Just by using Fable you're already contributing! You can help a lot the community by sharing examples and experiences in your personal blog and sending a PR to fable-awesome.

Send bug reports (ideally with minimal code to reproduce the problem) and feature requests to the GitHub repository. Issues with the label discussion will be also added to ask the opinion of the community on different topics like roadmap, etc. For more immediate comments you can use the Gitter chat.

If you are up to contribute a fix or a feature yourself, you're more than welcome! Please send first an issue or a minimal Work In Progess PR so we can discuss the implementation details in advance. We're planning to add documentation for developers directly in the code, either as README files in each directory or as comments in the source. This is currently an ongoing effort.

fable's People

Contributors

7sharp9 avatar alfonsogarciacaro avatar alxandr avatar coolya avatar davidpodhola avatar davidtme avatar fdcastel avatar forki avatar frankbro avatar fsoikin avatar i-p avatar inosik avatar jgrund avatar jmmk avatar johlrich avatar krzysztof-cieslak avatar markek avatar mastoj avatar ncave avatar nhowka avatar oopbase avatar pauan avatar piaste avatar ptrelford avatar scitesy avatar tomcl avatar tpetricek avatar valery-vitko avatar zaaack avatar zaid-ajaj avatar

Watchers

 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.