Giter Site home page Giter Site logo

ElixirScript Documentation Build

The goal is to convert a subset (or full set) of Elixir code to JavaScript, providing the ability to write JavaScript in Elixir. This is done by taking the Elixir AST and converting it into JavaScript AST and then to JavaScript code. This is done using the Elixir-ESTree library.

Documentation for current release

Requirements

  • Erlang 20 or greater
  • Elixir 1.6 or greater (must be compiled with Erlang 20 or greater)
  • Node 8.2.1 or greater (only for development)

Usage

Add dependency to your deps in mix.exs:

{:elixir_script, "~> x.x"}

Add elixir_script to list of mix compilers in mix.exs Also add elixir_script configuration

  def project do
  [
    app: :my_app,
    # ...
    # Add elixir_script as a compiler
    compilers: Mix.compilers ++ [:elixir_script],
    # Our elixir_script configuration
    elixir_script: [
        # Entry module. Can also be a list of modules
        input: MyEntryModule,
        # Output path. Either a path to a js file or a directory
        output: "priv/elixir_script/build/elixirscript.build.js"
    ]
  ]
  end

Run mix compile

Examples

Application

ElixirScript Todo Example

Library

ElixirScript React

Starter kit

Elixirscript Starter Kit

Development

# Clone the repo
git clone [email protected]:bryanjos/elixirscript.git

#Get dependencies
make deps

# Compile
make

# Test
make test

Communication

#elixirscript on the elixir-lang Slack

Contributing

Please check the CONTRIBUTING.md

Elixirscript's Projects

elixir-estree icon elixir-estree

The ESTree Nodes and JavaScript AST to JavaScript Code Generator in Elixir

tailored icon tailored

A Pattern matching library for JavaScript

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.