Skip to content
F# to JavaScript Compiler
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.vscode
docs Info on bitwise operations on small integers Jan 21, 2019
lib/fcs
src Added missing reference Mar 25, 2019
tests
tests_external Fixed duplicate project references Mar 5, 2019
.gitattributes
.gitignore Restructure repository Feb 11, 2019
.travis.yml
LICENSE
NuGet.Config Add NuGet.Config to fix restore on weird machines Mar 26, 2017
README.md
Settings.FSharpLint
appveyor.yml
build.fsx
global.json Fix CI Feb 11, 2019
package-lock.json
package.json

README.md

F# |> BABEL

The compiler that emits JavaScript you can be proud of!

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

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

Check this page.

Building

Make sure the following requirements are installed in your system:

Then run npm install to install dependencies and npm run build to start the build. Check build.fsx for other build targets. For example: npm run build compiler.

After that, if you want to quickly try changes to Fable source, please check src/quicktest/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 you can tell fable-compiler to use a local build. For this, use the cli.path option. For example when using the fable-loader you can include the following in your webpack.config.js:

  module: {
    rules: [
      {
        test: /\.fs(x|proj)?$/,
        use: {
            loader: "fable-loader",
            options: {
                cli: {
                    // This should be the path to your local clone of Fable
                    path: "../Fable/src/Fable.Cli"
                }
            }
        }
      }
    ]
  }

ATTENTION: Remember to build fable-library files beforehand. This can be done just by building the whole project (see "Building" above) or running the FableLibrary FAKE target (after this, if you edit one of the src/js/fable-library JS or TS files, you can run the FableLibraryTypescriptOnly 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. To interact with the community you can use the Gitter chat but please note maintainers are not checking the chat regularly.

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.

You can’t perform that action at this time.