madsflensted / elm-brunch

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

Set elm path #1

Closed urfolomeus closed 8 years ago

urfolomeus commented 8 years ago

I wanted to use elm-brunch on a Phoenix project that has the elm file within a web/elm folder, but brunch-config.js on the root. However doing this was running elm make on the root of the project, thus installing elm-stuff and elm-package.json on the root. This in turn meant that the elm file was unable to find its dependencies.

This PR allows you to set a config.plugins.elmBrunch.elmFolder option (defaults to null), which is then passed into the exec command as the cwd option (setting this to null by default means that current behaviour is maintained).

I also wrote some tests around this to ensure I hadn't broken anything, but I put these on a separate commit in case you'd rather not include them or their dependencies.

madsflensted commented 8 years ago

Hi @urfolomeus thanks for the PR that is a good feature. Also great that you added tests, but it looks like the second commit accidentally includes the node_modules folder with everything. Could I get you remove that folder then I will be happy to merge the PR.

urfolomeus commented 8 years ago

Oops! Yeah good point. I'll add it the gitignore and force push when I get back home. :)

urfolomeus commented 8 years ago

@madsflensted Done now. :)

Would you like me to squash the commits or are you happy with them as is?

madsflensted commented 8 years ago

@urfolomeus thanks again!

urfolomeus commented 8 years ago

@madsflensted thanks for accepting :)

madsflensted commented 8 years ago

published new version to npm

urfolomeus commented 8 years ago

:+1: