Closed wam closed 7 years ago
Well, that's the matter of taste. Personally, I prefer to use module.export
notation. Think about it as export default
from ES2015, while export.[name]
is like export [name]
.
I agree that we need to find some consistency in our configs around the docs, but that's not the most important task we need to solve on the way to better Brunch.
That is a very useful way of thinking about it. Thanks!
My concern was mostly that, as a newcomer to Brunch, at first I wasn't sure whether it was simply a matter of style, or if there were subtle differences in behavior, or if I'd done something wrong, or if the docs were out of date with the code.
Anyway, if you do end up wanting to change it in the docs at some point, I'd be happy to tackle that.
Some of the
brunch-config.js
examples on the site usemodule.exports
at the top level, but the default dead-simple skeleton uses plainexports
.For example, the concepts page shows this as the simplest possible config:
but if you run
brunch new projectname
(v2.10.9), you actually get:Should the examples on the site be brought up to date with the current output of
brunch new
? I looked through a random sample of skeletons and some of them do usemodule.exports
, and both ways currently work. Butexports
at the top level seems to be the default.I'm happy to submit a PR with changes to the relevant examples.