Open pravdomil opened 3 years ago
Thanks for reporting this! To set expectations:
Finally, please be patient with the core team. They are trying their best with limited resources.
The node-elm-compiler
package has compileToString
and compileToStringSync
functions. They compile into a temporary file and then read that.
Those functions seem quite popular:
So I think it would make sense to support outputting to stdout directly in elm make
. That avoids the temporary files, and probably the node-elm-compiler
dependency altogether in some cases!
Also we can then pipe Elm into UglifyJS.
elm make src/Main.elm --optimize | uglifyjs --compress 'pure_funcs=...' | uglifyjs --mangle
Also we can check if stdout is pipe or not and based on that do "create index.html" or "print JS to stdout".
It looks that the old issue https://github.com/elm/compiler/issues/961 is closed, and we are not able to emit JS to stdout, so I'm creating new issue?