Skip to content

Commit 056d92c

Browse files
committed
Update release post
1 parent 1f01df2 commit 056d92c

File tree

1 file changed

+7
-37
lines changed

1 file changed

+7
-37
lines changed

content/post/elixirscript-0.26.0-released.md

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,11 @@ This version of Elixirscript has a lot of major changes. Here are some of the ch
1010

1111
## Bundled output
1212

13-
This release is the first release to bundle all modules into one JavaScript file.
14-
The output will now include only the following:
15-
16-
* `Elixir.Bootstrap.js` - The Elixirscript bootstrapping JavaScript
17-
* `Elixir.App.js`. - The bundled modules
13+
This release is the bundle all output into a single file. Now the only file output will be `Elixir.App.js.`
1814

1915
## Removed `@on_js_load`
2016

21-
`@on_js_load` is no more. In order to start you application, you would do the following:
17+
`@on_js_load` is no more. To start an application, do the following:
2218

2319
```js
2420
//Note: An ES module example. Update for your module output of choice
@@ -28,8 +24,7 @@ const my_inital_args = [];
2824
Elixir.start(Elixir.MyApp, my_inital_args);
2925
```
3026

31-
This looks for a `start/2` function in the `MyApp` module. It tries to mimick the API of a normal
32-
Elixir Application.
27+
This looks for a `start/2` function in the `MyApp` module. It tries to mimick the API of a normal Elixir Application.
3328

3429
```elixir
3530
def start(type, args) do
@@ -38,8 +33,7 @@ Elixir Application.
3833

3934
## Removed `JS.import`
4035

41-
`JS.import` is also no more. External JavaScript modules now must be defined in configuration.
42-
A new configuration, `js_modules` is where they go.
36+
`JS.import` is also no more. External JavaScript modules are now defined in configuration. A new configuration, `js_modules` is where they go.
4337

4438
```elixir
4539
js_modules: [
@@ -48,32 +42,8 @@ js_modules: [
4842
]
4943
```
5044

51-
In the example above, both `React` and `ReactDOM` will be imported at the top of the bundled output.
52-
Each item can be a 2-tuple or a 3-tuple with the third element being a keyword list of options for the
53-
defined module output format.
54-
55-
56-
## elixirscript.exs config file
57-
58-
If you are using Elixirscript outside of a mix project,
59-
you can still give it configuration using an `elixirscript.exs` file. The contents must be a keyword list
60-
with the exact same options are the elixir_script config defined in mix projects.
61-
62-
```elixir
63-
#example elixirscript.exs file
64-
65-
[
66-
input: ["app/elixirscript"],
67-
output: "dist",
68-
format: :common,
69-
js_modules: [
70-
{React, "react"},
71-
{ReactDOM, "react-dom"}
72-
]
73-
]
74-
75-
```
45+
Elixirscript adds both `React` and `ReactDOM`  imports to the top of the bundled output. Each item must be 2-tuple or a 3-tuple. The third element is an optional keyword list of options.
7646

77-
The `elixirscript` CLI will look for an `elixirscript.exs` file in the current directory,
78-
or you can specify one with the `-c` flag
47+
The CLI now has a `js-module` to support the above.
7948

49+
`elixirscript input/path -o output/path --js-module React:react --js-module ReactDOM:react-dom`

0 commit comments

Comments
 (0)