@@ -30,9 +30,9 @@ This is the help output of elixirscript
3030 the elixir code string if passed the -e flag
3131 options:
3232 --js-module [<identifer>:<path>] A js module used in your code. ex: React:react
33- Multiple can be defined
33+ Multiple can be defined
3434 -f --format [format] module format of output. options: es (default), common, umd
35- -o --output [path] places output at the given path.
35+ -o --output [path] places output at the given path.
3636 Can be a directory or filename.
3737 -e --elixir read input as elixir code string
3838 --full-build informs the compiler to do a full build instead of an incremental one
@@ -49,10 +49,10 @@ elixirscript also takes a path to your `.ex` files as well:
4949
5050If you look in the dist folder you'll see a file called ` Elixir.App.js `
5151
52- To start your application import the bundle according to whichever module format was selected and
52+ To start your application import the bundle according to whichever module format was selected and
5353then call start giving it the module and the initial args.
5454
55- Ex. If you have a module like so
55+ Ex. If you have a module like so
5656``` elixir
5757defmodule Example do
5858 start (type, args) do
@@ -87,14 +87,15 @@ Add dependency to your deps in mix.exs:
8787 version: "0.1.0",
8888 elixir: "~> 1.0",
8989 deps: deps,
90- elixir_script: [
91- input: "lib/elixirscript",
92- output: "priv/elixirscript/Elixir.App.js",
90+ elixir_script: [
91+ input: "lib/elixirscript",
92+ output: "priv/elixirscript/Elixir.App.js",
9393 format: :es,
9494 js_modules: [
9595 {React, "react"},
96- {ReactDOM, "react-dom"}
97- ]
96+ {ReactDOM, "react-dom"},
97+ {Phoenix, "phoenix", default: false}
98+ ]
9899 ],
99100 compilers: [:elixir_script] ++ Mix.compilers
100101 ]
@@ -117,7 +118,9 @@ Available options are:
117118
118119 * ` :umd ` - UMD
119120
120- * ` js_modules ` : A list of JavaScript imports to add. Each item must be 2-tuple or a 3-tuple. The third element is an optional keyword list of options.
121+ * ` js_modules ` : A list of JavaScript imports to add. Each item must be 2-tuple or a 3-tuple. The third element is an optional keyword list of options:
122+
123+ * ` default ` - Defaults to true. Set to false if the imported module has no default export.
121124
122125### Macros
123126
@@ -160,6 +163,6 @@ There is an [elixirscript frontend boilerplate project](https://github.com/elixi
160163
161164There is an Brunch plugin, [ elixirscript-brunch] ( https://www.npmjs.com/package/elixirscript-brunch ) .
162165
163- ####
166+ #### elixirscript-loader
164167
165- There is also a webpack loader, [ elixirscript-loader] ( https://www.npmjs.com/package/elixirscript-loader ) .
168+ There is also a webpack loader, [ elixirscript-loader] ( https://www.npmjs.com/package/elixirscript-loader ) .
0 commit comments