These are chat archives for brunch/brunch

19th
Jun 2016
Dan McGuire
@dgmcguire
Jun 19 2016 18:12
is there a way to import everything inside a directory?
Colin Bate
@colinbate
Jun 19 2016 18:14
Import in which way? As in include in your bundle or reference in a particular module/file?
For the former, that is the default when you use joinTo, as for the latter, I don't think so. I don't think the common JS or ES6 modules support that.
Dan McGuire
@dgmcguire
Jun 19 2016 18:18
I'm not referencing the modules anywhere, just need to make sure the code is actually loaded up
I'll check out joinTo, thanks
so yeah joinTo, is exactly what I want I think - I was just trying to do something from my top level app.js instead of inside my config...thanks
Dan McGuire
@dgmcguire
Jun 19 2016 18:24
hmm, so I'm seeing a joinTo inside the javascripts that simply has joinTo: "js/app.js"
I was expecting a regex to state what was being joined to that file
I guess that's just a default that says join all_ things to that file and somewhere else in the config it states what _all means?
Colin Bate
@colinbate
Jun 19 2016 18:24
Yes you can provide that. By default everything goes in to the single file
But you can provide an object where the keys are the file names and the values are anymatch sets
Dan McGuire
@dgmcguire
Jun 19 2016 18:25
gotcha, trying to figure out how to append a match set to everything that is being joined currently
Colin Bate
@colinbate
Jun 19 2016 18:26
Brunch will grab everything inside your 'app' folder by default
Dan McGuire
@dgmcguire
Jun 19 2016 18:26
for reference I'm using a default phoenix (elixir) framework brunch setup
gotcha, thanks
Colin Bate
@colinbate
Jun 19 2016 18:27
Ok I'm not familiar with Phoenix other than knowing it uses brunch :)
Dan McGuire
@dgmcguire
Jun 19 2016 18:27
:)
I think I'm headed in the right direction though, so thanks
Colin Bate
@colinbate
Jun 19 2016 18:28
The brunch.io docs were recently overhauled and I think do a decent job explaining the opinionated parts of brunch. There is a config section as well which I have found useful.
Dan McGuire
@dgmcguire
Jun 19 2016 18:28
indeed, they are just so exhaustive that I'm probably going to have to read them 3 times before it clicks
I forget the first half of the docs by the time I'm done xD not a bad thing, just a lot to learn
Colin Bate
@colinbate
Jun 19 2016 18:29
Fair enough. Still easier than Webpack IMHO :)
Dan McGuire
@dgmcguire
Jun 19 2016 18:30
never used it....I stay away from javascript land as much as I can...too many tools and professionally I've found everyone jumps from tool to tool to tool
Colin Bate
@colinbate
Jun 19 2016 18:31
very true. You are never without choices.
Dan McGuire
@dgmcguire
Jun 19 2016 18:32
right now I'm actually building a library that gives a few simple macros in elixir that expand at compile time into javascript which essentially says "watch this chunk of html" and also "serialize and send this data back on this action" and then it send back the serialized data in the scope so I can realtime react via websockets and push up the new html
it's actually crazy how much faster websockets are than even http req's for json
and hopefully this library will bring javascript back to the good old days of just using jquery for enhancing UX rather than moving state around on the client
but yeah, different strokes for different folks :)
Colin Bate
@colinbate
Jun 19 2016 18:36
Absolutely. There is no limit to how and what we can do :) Best of luck with your Brunch integration and let us know if you have any more questions or problems
Dan McGuire
@dgmcguire
Jun 19 2016 18:36
will do, thanks again :)