Download Latest Version 0.32.1.zip (207.6 kB)
Email in envelope

Get an email when there's a new version of ElixirScript

Home / v0.26.0
Name Modified Size InfoDownloads / Week
Parent folder
elixirscript.tar.gz 2017-02-27 3.5 MB
0.26.0.tar.gz 2017-02-27 103.7 kB
0.26.0.zip 2017-02-27 159.1 kB
README.md 2017-02-27 1.3 kB
Totals: 4 Items   3.7 MB 0

[0.26.0] - 2017-02-27

Added

  • Multiple when clauses in guards
  • Kernel.defdelegate/2
  • js_modules configuration option has been added. This is a keyword list of JavaScript modules that will be used.

js_modules: [ {React, "react"}, {ReactDOM, "react-dom"} ] - js-module flag has been added to the CLI in order to pass js modules.

elixirscript "app/elixirscript" -o dist --js-module React:react --js-module ReactDOM:react-dom

Removed

  • @on_js_load has been removed in favor of having a start/2 function defined. More info below
  • JS.import has been removed in favor of defining JavaScript modules used in configuration

Changed

  • Now bundles all output, including the boostrap code. The exported object has Elixir modules in JavaScript namespaces that are lazily loaded when called.

To start your application import the bundle according to whichever module format was selected and then call start giving it the module and the initial args

javascript //ES module example import Elixir from './Elixir.App' Elixir.start(Elixir.App, [])

The start function will look for a start/2 function there. This is analogous to a Application module callback

Source: README.md, updated 2017-02-27