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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,16 @@
1
1
ElixirScript
2
2
============
3
3
4
-
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 [Spider Monkey AST](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API). From there, it uses [escodegen](https://github.com/estools/escodegen) to convert the Spider Monkey AST to JavaScript.
4
+
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](https://github.com/bryanjos/elixir-estree) library.
5
5
6
6
It also includes an escript CLI utility named ex2js. This takes files or Elixir code strings as input and emits Spider Monkey AST or JavaScript code. The results may be sent to standard output or files, based on the options selected.
7
7
8
+
ElixirScript is now in hex. There are transpile functions in th ElixirScript module. There is also a mix task, `mix ex2js` that works exactly like the cli client.
9
+
8
10
Requirements
9
11
===========
10
12
* Elixir
11
-
* Node or io.js
13
+
* Node or io.js (only for development)
12
14
13
15
14
16
Development
@@ -37,7 +39,7 @@ To build distributable tarball
37
39
38
40
`ex2js-version-tar.gz` will be in the `dist` folder
39
41
40
-
Installation
42
+
Installation of the CLI client
41
43
==============
42
44
43
45
* uncompress `ex2js.tar.gz`.
@@ -55,12 +57,9 @@ $ ex2js -h
55
57
the elixir code string if the -ex flag is used
56
58
57
59
options:
58
-
59
60
-o --output [path] places output at the given path
0 commit comments