Skip to content
94d8660 May 27, 2016
@paulmillr @goshakkk @joliss
69 lines (43 sloc) 3.4 KB

Contributing to Brunch

Did you find a bug?

First, make sure it was not already reported by taking a look at the currently open Issues on GitHub.

If nothing resembling what you are experiencing was reported, feel free to open a new issue. Make sure your description of the issue is clear and contains as much relevant information as possible. The issue will be handled more quickly if it includes a link to a sample repo that demonstrates incorrect behavior.

We never ask you to share your private, possibly NDA'd, application with us. Just create a tiny application that includes a resembling config as well as just enough code to reproduce the issue.A

Do you want to write a patch yourself?

The Process

  • Open a new Pull Request with the patch.
  • Clearly describe what is being fixed. If possible, reference a bug report or a feature request.
  • Update the docs if the new functionality is added.

Brunch internals overview

Brunch, the tool, is split across several modules:

  • brunch/brunch is the main repo. It ties everything together to provide the build tool you'll love. Generally, if something doesn't fit into the other repos, it goes here.

  • brunch/deppack is at heart of Brunch 2's new NPM integration. If it has to do with exposing NPM modules to the browser, it most likely belongs here.

  • brunch/node-browser-modules exposes browser shims for Node modules. This one is used by deppack.

  • brunch/commonjs-require-definition is the CommonJS runtime. It handles how modules are registered and required. This probably shouldn't be touched unless there is a new deppack feature that needs some changes to the runtime.

  • brunch/init-skeleton helps you create new Brunch apps. It uses the list of skeletons from brunch/skeletons

Some more:

Where the documentation lives:

How to set up the dev env

It won't make much sense to blindly edit the Brunch's sources and get no feedback on whether you are heading in the right direction. If you are making changes, you most likely are either a) fixing a bug, or b) adding a feature — in both of which cases you probably already have a sample app.

To use your local fork of Brunch, as you need to do is:

  1. run npm link in the Brunch fork directory. This will make your fork the globally available Brunch on your system.
  2. run npm link brunch in your sample application. This will make node_modules/brunch in your app a symlink to your Brunch fork.

Additionally, if your changes span past brunch/brunch, you will also need to:

  1. run npm link from the forked module.
  2. run npm link <module name> from the Brunch fork directory to link it to Brunch.
Something went wrong with that request. Please try again.