Building An Assets Subdirectory When Using Brunch

Brunch has an opinion about the app/assets/ directory that it generates as part of an app skeleton. It simply copies these files over to the deployment directory, w/o running them through any minification.

But let's say I want to build a standalone page under the assets/ directory, maybe for a signup form for my website (which I don't really feel like making into a Backbone View). This form could share the vendor/ minified files, but would not have a need for the app.js or app.css files.

By default, Brunch wouldn't process those files, as they would be somewhere under, say, app/assets/signup.

Here's a custom config_signup.coffee file that builds files in the assets/signup/ directory and copies them where I expect. It would be pretty sweet if this could be somehow chained onto the main CoffeeScript file.

Now when I run brunch build -c config_signup.coffee --minify, I can get the same processing on this particular subset of the site.

# Manages the build for the signup page.                                                                                                              
exports.config =
    # See docs at http://brunch.readthedocs.org/en/latest/config.html.                                                                                
    paths:
        public: '/path/to/deployment/signup'

    coffeelint:
	pattern: /^app/.*.coffee$/
	options:
            indentation:
		value: 4
		level: "error"

    files:
        javascripts:
            joinTo:
                'index.js': /^app(/|\)assets(/|\)signup/

	stylesheets:
            joinTo: 'index.css': /^app(/|\)assets(/|\)signup/

    conventions:
	ignored: -> false
	assets: -> false