Skip to content

Instantly share code, notes, and snippets.

@oogatta
Created July 25, 2012 06:34
Show Gist options
  • Save oogatta/3174776 to your computer and use it in GitHub Desktop.
Save oogatta/3174776 to your computer and use it in GitHub Desktop.
// ...
concat: {
core: {
src: ['src/brook.js','src/brook/util.js','src/brook/lambda.js','src/brook/channel.js','src/brook/model.js'],
dest: 'build/brook-core.js'
},
htp: {
src: ['<file_enclose_with_namespace:brook.view.htmltemplate.core:lib/html-template-core.js>'],
dest: 'build/brook-view-htmltemplate-core.js'
},
compat: {
src: ['<concat_nest:core>','<concat_nest:htp>','src/brook/view/htmltemplate.js','src/brook/dom/compat.js','src/brook/dom/gateway.js','src/brook/widget.js'],
dest: 'build/brook.js'
},
mobile: {
src: ['<concat_nest:compat>','src/brook/mobile/dom/event.js'],
dest: 'build/brook-mobile.js'
}
},
// ...
grunt.registerHelper('concat_nest', function(name) {
return grunt.helper('concat', grunt.file.expandFiles(grunt.config.get('concat.'+name+'.src')));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment