Build tools > Brunch
addyosmani opened this issue · comments
Updated to reflect Brunch focus as a build tool more than scaffolding
Brunch is an application assembler for organizing and building webapps. If we're covering Grunt and Gulp, it would be nice to balance this out with a detailed write-up on using Brunch too. They're all great tools.
@paulmillr I noticed https://github.com/brunch/brunch/wiki is a few months old. Do you have any recent articles/authors of great tutorials on Brunch you think it would be useful to speak to? Would be great to have it captured here too.
I don't think i'd consider Brunch as a scaffolding tool. Scaffolding is like generating app from pre-defined generator right? brunch new
is just an alias of git clone && rm -rf .git && npm i & bower i
useful (but not mandatory) for new projects.
All the main thing is in build
and watch
commands and there are no others. So, it is a build tool. A build tool, main features of which are focus on simplicity and support for incremental compilation (because of that, speed).
Incremental compilation allows Brunch to intuitively recompile only stuff that was changed since the last build. There are alternatives for that like grunt-concurrent + grunt-newer but they absolutely not as good as brunch on that as per my subjective opinion.
This is the best article I am aware of http://alxhill.com/blog/articles/brunch-coffeescript-angular/ and I can help with all the details.
👍 Brunch is a frontend build tool, not for scaffolding.
Older versions used to have scaffolding features, but those were split out to https://github.com/paulmillr/scaffolt long ago. You may want to include that instead under your scaffolding section, although there isn't as much of a community around it.
Really appreciate the clarifications @paulmillr and @es128. I'll move Brunch over to the build tools section of the book - definitely before Gulp given how long it's been around. I'll reach out to Alex who wrote the article you pointed out and see if he'd be interested in contributing!
@alxhill would you have any interest in authoring a Brunch chapter for this OSS book on JS tooling based on your original article that Paul referenced above?
Hey, glad you liked the article! I'd be more than happy to author a chapter on Brunch. Is there a plan on how the content will be organised? Also it'd be great to have a chapter on writing plugins, something I've been meaning to blog about for a while.
@addyosmani @alxhill I'd be happy to contribute to this effort as well. If Alex will be taking lead, I could proofread, edit, etc, or I could write drafts on particular topics. Just let me know.
That would be fantastic, both!. @alxhill We currently have the planned index of contents in the README and are finalizing content structure across #15, #9. One thing other authors / communities have been doing for their chapters is deciding on the content for their chapter in the issue for it (e.g here) and then assigning who will write what topics for it.
Perhaps you, @es128 and @paulmillr could brainstorm on that here? As a guide see #2
Apologies for taking so long to get going with this - I've had exams to revise for, thankfully the hard one's over now!
What do we think of the following basic structure? Things in italics need to be written, whilst the rest can be adapted from my post pretty easily.
Introduction
- High level overview of Brunch's abilities
- How Brunch differs from existing tools (mainly Grunt, but worth comparing to Gulp too. Less opinionated than the post).
- When is/isn't Brunch the right choice?
Getting Started
- Installation
- Brief overview of skeletons
- Brunch conventions - assets, public, app.js & vendor.js etc.
- 'Standard' Brunch folder structure - needs expanding from article. could be in 'using brunch' section?
Using Brunch
- How to setup/configure Brunch (
config.coffee
)- Module wrapping
- Installing & using plugins
- Types of plugins
- Plugins used for common tasks (basic js/css/templates, minifiers, coffeescript, autoreload etc)
- Configuring plugins
- Deployment, as well as using and configuring environments (e.g --production as well as custom environments)
The main thing I'm unsure on is where the support for Bower should be mentioned - conventions, folder structure, or somewhere in the 'using brunch' section?
Also, thoughts on a bit on writing plugins? I can't say I've done much of that myself, but it could be worth adding. Otherwise a link to the wiki page somewhere would be a good idea.
@alxhill Looks good! One suggestion I have would be inserting a section into the middle of the getting started section that shows a very simple walkthrough of the entire process: clone a skeleton with new
, watch
with the built-in server, and build
with production settings. This would be a quick high level kind of overview so that the essence of what brunch does can be expressed upfront before getting distracted by configuration details, etc.
The other thing I'd suggest is a "Workflow" section before the deployment one at the end. This would cover the details of watch
, custom node servers, auto-reload, and sourcemaps.
As for plugin authoring, I'd agree that for the sake of this book a link to the existing wiki page would suffice for now.
+1 to Elan but looks great!
Super-opinionated scaffolding using Brunch for desktop apps: https://github.com/Anonyfox/node-webkit-hipster-seed
Hey, agreed with your changes @es128! I'll work on adding content from my post into the repo, and we'll reevaluate what needs writing once that's done. Sound okay?
Absolutely.
Any idea when you think you'll have that first draft posted?
I've got some work to do (hence the lack of progress lately), but I'm aiming to have a pull request submitted this evening.
Thanks for your initial work on the chapters @alxhill :)
Would you or anyone else be interested in filling in the missing pieces?
I'm very interested in contributing to this effort, but unfortunately my available time is very constricted. I intend to fill more of it in if/when I can, but in the meantime I'm happy to help with proofreading/editing if anyone else would like to have a hand in writing some of the content.
I'm currently in the middle of exams, but will be able to give some more time to this early June.