All Versions
42
Latest Version
Avg Release Cycle
33 days
Latest Release
2495 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v0.32.1 Changes
March 17, 2018๐ Fixed
- Global JavaScript modules not compiling correctly
-
v0.32.0 Changes
February 10, 2018โ Added
ElixirScript.Test
for testing ElixirScript modules in JavaScript. ElixirScript.Test is for unit testing modules that interact with JavaScript in some way. For modules that are can be used in both Elixir and ElixirScript, ExUnit is still preferred. Tests that use ElixirScript.Test must be placed in atest_elixir_script
folder in the root of your project. These tests are run using node.js. The API for ElixirScript.Test is meant to be as close to ExUnit as possible.
๐ Changed
- ElixirScript now requires Elixir 1.6. This is so that ElixirScript can use the new
Mix.Task.Compiler
behaviour. mix clean
will now correctly clean up ElixirScript output.- Compiler will now output a JavaScript file per Elixir module.
- Modules with a start function must be started directly.
# Before ElixirScript 0.32.0: import Elixir from './elixirscript.build.js' Elixir.start(Elixir.Main, [1, 2, 3]) # ElixirScript 0.32.0 and later: import Main from './Elixir.Main.js' Main.start(Symbol.for('normal'), [1, 2, 3])
-
v0.31.1 Changes
September 28, 2017๐ Fixed
- Compiler error when
receive
is used as variable name
- Compiler error when
-
v0.31.0 Changes
September 24, 2017โ Added
- Compiler will now accept a path to Elixir Files to compile
- Added
ElixirScript.JS.map_to_object/2
with options [keys: :string, symbols: false] - Added
ElixirScript.JS.object_to_map/1|2
with options [keys: :atom, recurse_array: true] - Fully implement
__info__
on modules - Concurrent Compilation
- The following erlang functions have been implemented:
- :erlang.nodes/0
- :erlang.nodes/1
- :math.log2/1
- :binary.copy/1
- :binary.copy/2
- :binary.part/2
- :binary.part/3
- :binary.replace/3
- :binary.replace/4 (some options still missing)
๐ Fixed
- ๐ Make sure not to add underscores to erlang functions
- Make sure any variable names that are javascript keywords are handled properly
- Make sure variables that begin with
_
are available - Finding the use of functions within anonymous functions
- Reimplement
String.split_at/2
to make sure Unicode library isn't compiled - byte_size does not work on binaries that started via "" elixir string syntax
- using . (dot) reference syntax on a map fails when value is a function
- Make sure that remote ast works correctly with variables
- Make sure == works as expected
- Make sure that erlang function names that are also JavaScript keywords are not filters
- erlang.error now throws errors resembling those in Elixir
- Map.get fails if key is tuple or list
-
v0.30.0 Changes
August 15, 2017โ Added
- ๐ ElixirScript now has a Foreign Function Interface (FFI) for interoperability with JavaScript. For more details, see documentation at
ElixirScript.FFI
ElixirScript.JS.mutate/3
ElixirScript.JS.map_to_object/1
- 0๏ธโฃ
root
option for specifying the root import path for FFI JavaScript modules. Defaults to"."
๐ Changed
- Compiler has been completely rewritten. ElixirScript now requires Erlang 20+ and Elixir 1.5+
JS
module renamed toElixirScript.JS
- ๐ Default output path is now
priv/elixir_script/build
โ Removed
- ๐ Support for CommonJS and UMD output formats has been removed. Output will be in ES module format
- ๐ The
js_modules
option has been removed in favor of the new FFI - ๐ ElixirScript.Watcher has been removed
- ๐ ElixirScript now has a Foreign Function Interface (FFI) for interoperability with JavaScript. For more details, see documentation at
-
v0.28.0 Changes
June 11, 2017โ Added
- ๐
remove-unused
option that will remove all unused modules from output - reimplemented structs to avoid creating JavaScript classes
- ๐
-
v0.27.0 Changes
March 18, 2017โ Added
super
defoverridable
IO.inspect\1
,IO.puts\1
,IO.puts\2
,IO.warn\1
Elixir.load
for loading generated JavaScript modules in bundled output. UnlikeElixir.start
, this will only call__load
on the module and return the functions on it
const exports = Elixir.load(Elixir.MyApp); exports.hello();
๐ Changed
-ex
alias is now-e
- A filename can be specified for output
- To access global JavaScript functions, modules, and properties, use the
JS
module
JS.length # translates to 'length' JS.alert() # translates to 'alert()' JS.String.raw("hi") # translate to String.raw('hi') JS.console.log("hi") # translates to console.log('hi')
๐ Fixed
- ๐ Make sure mix compiler works in umbrella apps
-
v0.26.1 Changes
February 28, 2017[0.26.1] - 2017-02-27
๐ Fixed
- ๐ Fixed
for
translation - ๐ Updated documentation
- ๐ Fixed
-
v0.26.0 Changes
February 27, 2017[0.26.0] - 2017-02-27
โ Added
Multiple
when
clauses in guardsKernel.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 astart/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//ES module exampleimport Elixir from './Elixir.App'Elixir.start(Elixir.App, [])
The
start
function will look for astart/2
function there.
This is analogous to a Application module callback -
v0.25.0 Changes
February 19, 2017[0.25.0] - 2017-02-19
โ Added
- ๐ Updated elixir_script mix compiler to support compiling elixir_script paths in dependencies if dependency has mix compiler defined as well
- โ Add
Collectable
protocol implementations - โก๏ธ Updated
for
implementation to useCollectable
format
option. Can now specify the module format of output.
Choices are:
0๏ธโฃ *:es
(default) for ES Modules
*:umd
for UMD
*:common
for CommonJS- 0๏ธโฃ Default input, output and format for elixirscript mix compiler. In a mix project by default the elixirscript compiler will look in
lib/elixirscript
and input and place output inpriv/elixirscript
. The default format is:es
โ Removed
receive
Process
module
๐ Fixed
- JS module functions not translated properly when imported
- โก๏ธ Update fs dependency to 2.12
- Incorrect handling of function heads with guards