Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Converts Elixir to JavaScript

License

NotificationsYou must be signed in to change notification settings

elixirscript/elixirscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 theElixir-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"}

Addelixir_script to list of mix compilers in mix.exsAlso addelixir_script configuration

defprojectdo[app::my_app,# ...# Add elixir_script as a compilercompilers:Mix.compilers++[:elixir_script],# Our elixir_script configurationelixir_script:[# Entry module. Can also be a list of modulesinput:MyEntryModule,# Output path. Either a path to a js file or a directoryoutput:"priv/elixir_script/build/elixirscript.build.js"]]end

Runmix compile

Examples

Application

ElixirScript Todo Example

Library

ElixirScript React

Starter kit

Elixirscript Starter Kit

Development

# Clone the repogit clone git@github.com:bryanjos/elixirscript.git#Get dependenciesmake deps# Compilemake# Testmaketest

Communication

#elixirscript on the elixir-lang Slack

Contributing

Please check theCONTRIBUTING.md


[8]ページ先頭

©2009-2025 Movatter.jp