Skip to content

Commit 090ed68

Browse files
committed
Change Elixir.App.js to elixirscript.build.js
1 parent 67f3100 commit 090ed68

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

JavascriptInterop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ For more information and options. Check the documentation for `ElixirScript.FFI`
8181
```
8282

8383
```javascript
84-
import Elixir from './Elixir.App.js'
84+
import Elixir from './elixirscript.build.js'
8585
Elixir.start(Elixir.Main, [1, 2, 3])
8686
```
8787

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Also add `elixir_script` configuration
3232
# Entry module. Can also be a list of modules
3333
input: MyEntryModule,
3434
# Output path. Either a path to a js file or a directory
35-
output: "priv/elixir_script/build/Elixir.App.js"
35+
output: "priv/elixir_script/build/elixirscript.build.js"
3636
]
3737
]
3838
end

lib/elixir_script.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ defmodule ElixirScript do
2929
# Entry module. Can also be a list of modules
3030
input: MyEntryModule,
3131
# Output path. Either a path to a js file or a directory
32-
output: "priv/elixir_script/build/Elixir.App.js"
32+
output: "priv/elixir_script/build/elixirscript.build.js"
3333
]
3434
]
3535
end
@@ -42,16 +42,16 @@ defmodule ElixirScript do
4242
* `output`: The path of the generated JavaScript file. (defaults to `priv/elixir_script/build`)
4343
4444
If path ends in `.js` then that will be the name of the file. If a directory is given,
45-
file will be named `Elixir.App.js`
45+
file will be named `elixirscript.build.js`
4646
4747
* `root`: Optional root for imports of FFI JavaScript modules. Defaults to `.`. If using output directly in a browser, you may want to make it something like `/js` or some uri.
4848
4949
50-
Now run `mix compile` and you should see a JavaScript file named `Elixir.App.js` in the `priv/elixir_script/build/` directory. ElixirScript outputs JavaScript in the ES Module format. If your browser supports it, you can include the output in a script tag with the type "module"
50+
Now run `mix compile` and you should see a JavaScript file named `elixirscript.build.js` in the `priv/elixir_script/build/` directory. ElixirScript outputs JavaScript in the ES Module format. If your browser supports it, you can include the output in a script tag with the type "module"
5151
5252
```html
5353
<script type="module">
54-
import Elixir from '/js/Elixir.App.js'
54+
import Elixir from '/js/elixirscript.build.js'
5555
const myInitialArgs = []
5656
5757
Elixir.start(Elixir.MyEntryModule, myInitialArgs)

lib/elixir_script/compiler.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ defmodule ElixirScript.Compiler do
1818
1919
If output is a path, the generated code placed in that path.
2020
If path ends in `.js` then that will be the name of the file.
21-
If a directory is given, file will be named `Elixir.App.js`
21+
If a directory is given, file will be named `elixirscript.build.js`
2222
2323
* `root`: Optional root for imports of FFI JavaScript modules. Defaults to `.`.
2424
"""

lib/elixir_script/passes/output.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule ElixirScript.Output do
33

44
alias ElixirScript.State, as: ModuleState
55
alias ESTree.Tools.{Builder, Generator}
6-
@generated_name "Elixir.App.js"
6+
@generated_name "elixirscript.build.js"
77

88
@doc """
99
Takes outputs the JavaScript code in the specified output

lib/mix/tasks/compile.elixir_script.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defmodule Mix.Tasks.Compile.ElixirScript do
2424
* `output`: The path of the generated JavaScript file. (defaults to `priv/elixir_script/build`)
2525
2626
If path ends in `.js` then that will be the name of the file. If a directory is given,
27-
file will be named `Elixir.App.js`
27+
file will be named `elixirscript.build.js`
2828
2929
* `root`: Optional root for imports of FFI JavaScript modules.
3030
Defaults to `.`. If using output directly in a browser, you may want to make it something like `/js` or some uri.

test/compiler_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule ElixirScript.Compiler.Test do
2020
path = System.tmp_dir()
2121

2222
ElixirScript.Compiler.compile(Atom, [output: path])
23-
assert File.exists?(Path.join([path, "Elixir.App.js"]))
23+
assert File.exists?(Path.join([path, "elixirscript.build.js"]))
2424
end
2525

2626
test "Output file with custom name" do

0 commit comments

Comments
 (0)