brunch/brunch — Issue #162: Implement new config 
Author: paulmillr
Created: 2011-12-14 19:40:41+00:00
State: open
Labels: change

For the last few days I've thought about new config system.

Here's an example of `config.coffee` that would be supported in brunch 0.9:

```coffeescript
{plugins, languages} = require 'brunch'

exports.config =
# Every plugin category could only have one value.
# List of valid categories:
#
# * CI: continuous integration system.
# * MVC: a framework that would serve as skeleton of app.
# * tests: testing framework
#
plugins:
CI: plugins.Travis
MVC: plugins.Backbone # plugins.Batman is also supported by-default
tests: plugins.Jasmine # tests.Mocha is also supported by-default
# A list of languages that your application will support.
# Specify them in format:
#
# 'name of output file':
# 'file matching regexp': language class
#
languages:
'scripts/app.js':
'\.eco$': languages.Eco
#'\.jade$': languages.Jade
#'\.mustache$': languages.Mustache
'styles/app.css':
'\.css$': languages.CSS
'\.styl$': languages.Stylus
#'\.sass$': languages.SASS
#'\.less$': languages.LESS
# Specify ordering of compiling in format:
#
# 'name of output file':
# before: [files that would be compiled before all scripts / styles]
# after: [files that would be compiled after all scripts / styles]
#
ordering:
'scripts/app.js':
before: [
'vendor/scripts/console-helper.js'
'vendor/scripts/jquery-1.7.1.js'
'vendor/scripts/underscore-1.1.7.js'
'vendor/scripts/backbone-0.5.3.js'
]

'styles/app.css':
before: ['vendor/styles/normalize.css', 'vendor/styles/bootstrap.less']
after: ['vendor/styles/helpers.css', 'app/styles/things.sass']
```

Suggestions etc. are welcome, as always.