4 ms·
AFAIK Elm can't actually write to the filesystem, how does the compiler get around that? Or has Elm changed such that it can work outside the browser now?
by leshow 5y ago
AFAIK Elm can't actually write to the filesystem, how does the compiler get around that? Or has Elm changed such that it can work outside the browser now?
- mjaniczek 5y agoI use ports to write to the filesystem. There is a small amount of JS that initializes Elm, which runs in Node and has the ability to write to the filesystem. Of course if you'll be running elm-in-elm in the browser, you won't be able to do that. But there are more interesting things to do with a compiler in the browser :)
- k_bx 5y agoPorts let you communicate with Elm from pure js, for example here’s the cli wrapper for node https://github.com/elm-in-elm/compiler/blob/master/cli/index.js https://github.com/elm-in-elm/compiler/blob/master/cli/index...