Passing --path-to-elm-make=/path/to/elm-make allows you to choose a custom elm-make instance (e.g. the one installed locally) (#13)
You can now import run-elm in a Node app and run it directly instead of spawning a process (#14)
import runElm from 'run-elm';
// or
// const runElm = require('run-elm').default;
(async () => {
const { output, debugLog } = await runElm('path/to/Main.elm');
// output: string
// debugLog: string[]
const anotherRunElmResult = await runElm(
'/path/to/project/subdirectory/Custom.elm',
{
outputName: 'customOutput',
projectDir: '/path/to/project',
report: 'json',
pathToElmMake: '/path/to/elm-make'
}
);
})();- Add full stops to some error messages for consistency (#15)
Passing --report=json to run-elm makes Elm compilation errors in stderr easier to parse (#12)
- Fix stdout truncation (#8)
This release includes new command line options courtesy of @kachkaev.
Specify a custom name for the output constant or function by adding --output-name=myCustomConstantOrFunction.
Add --project-dir=/path/to/project to help Elm pick the correct elm-package.json and elm-stuff if the Elm file is in a subdirectory.
run-elm --help prints usage instructions and run-elm --version outputs the installed version.
- Bring back Node 6 support.
run-elm now supports command line arguments to output as a list of strings.
module Main exposing (output)
output : List String -> String
output args =
String.join "-" args ++ "!"Running this:
run-elm Main.elm hello worldResults in this:
hello-world!
run-elm still supports an output function with no args.
output : String
output =
"Some static content"- run-elm now only supports Node 8 and after
Internal changes
Initial release