Skip to content
Converts Elixir to JavaScript
Branch: master
Clone or download
Latest commit b1cd9c3 Jul 3, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Added environment configs. Added lib_path configuration Mar 29, 2016
lib
priv/testrunner Prep for release Feb 10, 2018
src/javascript test fixes Dec 10, 2017
test
test_elixir_script
.babelrc Make sure Collectable is loaded for 'for'. Update node version to 8.3.0 Aug 26, 2017
.credo.exs
.ebert.yml Add esm folder to ebert ignore Nov 2, 2017
.eslintrc.js
.gitignore
.tool-versions
.travis.yml Update elixir version in travis config Jan 18, 2018
CHANGELOG.md Update changelog Mar 17, 2018
CONTRIBUTING.md Update documentation Jun 25, 2017
CompilerInternals.md
JavascriptInterop.md
LICENSE
Makefile Testing using elixirscript.test Oct 26, 2017
README.md
mix.exs Add CompilerInternals.md May 20, 2018
mix.lock
package.json
rollup.config.js
yarn.lock Add documentation Oct 28, 2017

README.md

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 git@github.com: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

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.