Newbie - which build tool

172 views
Skip to first unread message

Colin Yates

unread,
Oct 28, 2016, 9:19:59 AM10/28/16
to Elm Discuss
Hi,

I have to get up to speed super-quick with Elm and so I want to stay as mainstream as possible (yeah, I know it isn't 1.0 yet :-)). I am stuck trying to decide on a build tool that:

 - handles CSS (generating and compressing)
 - hot reload code in the browser so no refreshing
 - executes any tests
 - concatenates and optimises the JS

Basically, my question is "leiningen is to Clojure as _______ is to Elm" :-).

If the community had one voice, what would they fill in the blank?

Thanks all.

Wouter In t Velt

unread,
Oct 28, 2016, 9:36:25 AM10/28/16
to Elm Discuss
Op vrijdag 28 oktober 2016 15:19:59 UTC+2 schreef Colin Yates:
Basically, my question is "leiningen is to Clojure as _______ is to Elm" :-).

If the community had one voice, what would they fill in the blank?

Don't know anything about Ieiningen or Clojure, but I am a content user of elm-webpack-starter, for bundling, hot reload, and sass-to-css.
Mine is just 1 small voice from the community though.
Apparently elm-live is pretty good too, and appears to be somewhat lighter than webpack, but I have no experience with it.

Colin Yates

unread,
Oct 28, 2016, 9:58:36 AM10/28/16
to elm-d...@googlegroups.com
Thanks Wouter, The helpful community over at Slack have pointed me at
create-elm-app (https://medium.com/@eduardkyvenko/how-to-create-elm-app-cf052629a11a#.g1mhraj3o)
which is working well.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Elm Discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elm-discuss/7hEp70pIh98/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> elm-discuss...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

OvermindDL1

unread,
Oct 28, 2016, 11:21:23 AM10/28/16
to Elm Discuss
I use brunch for all of the above except `executes any test`, of which I just use `npm test` for that.  Simple, significantly faster than webpack (though both will be bound by elm's slow compiling speed if that is all it is really handling).

Colin Yates

unread,
Oct 28, 2016, 11:24:13 AM10/28/16
to elm-d...@googlegroups.com
Thanks OvermindDL1 - I did see a blog post about brunch but I kinda
skimmed over it as it didn't look that mainstream. Thanks again.

OvermindDL1

unread,
Oct 28, 2016, 11:38:15 AM10/28/16
to Elm Discuss
Brunch is much older than webpack, one of the first javascript build systems.  Instead of specifying tasks everything is built via plugins, entirely concurrently and keeping things in memory as it is passed from thing to thing as it can, which makes it blazing fast (at work we have a few *thousand* javascript files totaling a few megs, it compiles it all in <4s flat.  Compared to one of the Elm apps, which elm takes over 40s to compile, which the elm source totals 290KB.  So Brunch can do all the elm and javascript simultaneously before bringing them all together, optimizing them, minifying, closure-compiling, etc..., whenever elm finishes that is.  ^.^

But yep, there are plugins for about anything for brunch, and dead simple to make your own as I've done.  You define a configuration for the plugins you use, there is no imperative declaration like grunt or so, just configuration, which makes it very simple.  I highly recommend brunch.

Brunch is also the distributed javascript asset build system for the Phoenix web server library as well, which is the fastest growing server out right now, of which they chose brunch for the reason of its fast compilation time so it can re-serve pages on the fly as files are edited.

Brunch plugins include not just compiling plugins but also has a web server plugin, where you can see file changes on the fly, a diff pusher, which sends updates to the files (css/javascript/whatever) to the embedded webserver plugin without needing a page reload, etc...

Colin Yates

unread,
Oct 28, 2016, 12:43:37 PM10/28/16
to elm-d...@googlegroups.com
Thanks for that, I will put it back on the "todo" list then. Thanks

Kasey Speakman

unread,
Oct 28, 2016, 12:59:53 PM10/28/16
to Elm Discuss
I also use elm-webpack-starter but replace Bootstrap with Semantic UI.

Martin DeMello

unread,
Oct 28, 2016, 3:24:03 PM10/28/16
to elm-d...@googlegroups.com
On Fri, Oct 28, 2016 at 6:36 AM, Wouter In t Velt <wouter....@gmail.com> wrote:

Don't know anything about Ieiningen or Clojure, but I am a content user of elm-webpack-starter, for bundling, hot reload, and sass-to-css.
Mine is just 1 small voice from the community though.
Apparently elm-live is pretty good too, and appears to be somewhat lighter than webpack, but I have no experience with it.

+1 for elm-webpack-starter, it all just works.

martin 
Reply all
Reply to author
Forward
0 new messages