madsflensted / elm-brunch

Brunch plugin to compile Elm code
MIT License
74 stars 31 forks source link

Request: option to use use local elm binary #18

Open urfolomeus opened 8 years ago

urfolomeus commented 8 years ago

This is more of a request than an issue. It occurred to me that seeing as you can now install the elm command line tool via npm, that you could install a project-specific version of elm and run from node_modules/bin/elm instead of elm. This would allow you specify elm as a project dependency and also lock to a particular version if need be.

With this being the case elm-brunch would need to be able to either take an option that would specify the elm binary command to run, or that would check first for a local elm and default to global if a local not found.

What do you think? I don't mind adding this feature if you think it is worthwhile.

madsflensted commented 8 years ago

I guess you would normally have the elm binary location in your path of in the shell you run brunch in, but having an option to specify to location could maybe come in handy anyway.

urfolomeus commented 8 years ago

Cool, thanks. I'll have a look at it over the weekend. :)

AdrianRibao commented 8 years ago

+1 for this. Now I'm getting always

/bin/sh: 1: elm: not found

and I have in bashrc:

export PATH=./node_modules/.bin:$PATH

So it could be great if we had an option for setting the executable to:

$(npm bin)/elm

urfolomeus commented 8 years ago

Yeah sorry, I've been tied up with other stuff so never got round to implementing. I might have time over the coming week though :)