           src: modules
         ]
 
+      brunch:
+        files: [
+          dest: 'build/brunch/<%= pkg.name %>.js'
+          src: modules
+        ]
+
+        options:
+          banner: '''
+          /*!
+           * Chaplin <%= pkg.version %>
+           *
+           * Chaplin may be freely distributed under the MIT license.
+           * For all details and documentation:
+           * http://chaplinjs.org
+           */
+
+          // Dirty hack for require-ing backbone and underscore.
+          (function() {
+            var deps = {
+              backbone: window.Backbone, underscore: window._
+            };
+
+            for (var name in deps) {
+              (function(name) {
+                var definition = {};
+                definition[name] = function(exports, require, module) {
+                  module.exports = deps[name];
+                };
+
+                try {
+                  require(item);
+                } catch(e) {
+                  require.define(definition);
+                }
+              })(name);
+            }
+          })();
+
+
+          '''
+
     # Lint
     # ----
     coffeelint:

          src: '**/*.js'
        ]

        options:
          processContent: (content, path) ->
            name = ///temp/(.*)\.js///.exec(path)[1]
            """
            require.define({'#{name}': function(exports, require, module) {
            #{content}
            }});
            """

      amd:
        files: [
          expand: true

    'compress:amd'
  ]

  grunt.registerTask 'build:brunch', [
    'coffee:compile'
    'urequire'
    'copy:commonjs'
    'concat:brunch'
    'uglify:brunch'
    'compress:brunch'
  ]

  grunt.registerTask 'build', [
    'build:amd'
    'build:commonjs'
    'build:brunch'
  ]

  # Lint
