https://github.com/eeue56/elm-node-elm-compiler
Elm compiler via Node
https://github.com/eeue56/elm-node-elm-compiler
elm elm-native
Last synced: 18 days ago
JSON representation
Elm compiler via Node
- Host: GitHub
- URL: https://github.com/eeue56/elm-node-elm-compiler
- Owner: eeue56
- License: bsd-3-clause
- Created: 2017-02-11T13:45:49.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-28T16:29:31.000Z (about 8 years ago)
- Last Synced: 2025-04-15T01:15:39.411Z (18 days ago)
- Topics: elm, elm-native
- Language: Elm
- Size: 5.86 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-node-elm-compiler
Elm compiler via node-elm-compiler:fire: :fire: :fire: :fire:
Experimental.
## Install
You need elm-github-install in order to install this package.
```
npm install node-elm-compiler elm-github-install
elm install eeue56/elm-node-elm-compiler
```## Usage
You may want to compile an Elm file to a string you can check out. This is an example of compiling `example/Main.elm` to Html.
```elm
Task.attempt CompiledThing (compileToString ({ output = Just ElmCompiler.Html }) "example/Main.elm"
```You may want to just compile an Elm file, and don't care about getting the result. You can do that with something like the below, which will store the generated file in `_test.js`.
```elm
Task.attempt CompileToFile (compileToFile "example/Main.elm" "_test.js")
```