Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added bundle targets. Changed license format to /*! */ style.

  • Loading branch information...
commit 4fd3b4c0f70d7fa4e462799aa22c6523c9e6dd24 1 parent 80055a4
@jsoverson jsoverson authored
Showing with 92 additions and 8 deletions.
  1. +92 −8 grunt.js
View
100 grunt.js
@@ -6,18 +6,75 @@ module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
+ pkg: '<json:package.json>',
meta: {
- version: '1.0.0-beta1',
- banner: '// Backbone.Marionette, v<%= meta.version %>\n' +
- '// Copyright (c)<%= grunt.template.today("yyyy") %> Derick Bailey, Muted Solutions, LLC.\n' +
- '// Distributed under MIT license\n' +
- '// http://github.com/marionettejs/backbone.marionette'
+ version: '<%= pkg.version %>',
+ banner: '/*!\n' +
+ ' * Backbone.Marionette, v<%= meta.version %>\n' +
+ ' * Copyright (c)<%= grunt.template.today("yyyy") %> Derick Bailey, Muted Solutions, LLC.\n' +
+ ' * Distributed under MIT license\n' +
+ ' * http://github.com/marionettejs/backbone.marionette\n' +
+ '*/',
+ banner_core :
+ '<%= meta.banner %>\n' +
+ '/*!\n' +
+ ' * Includes Wreqr\n' +
+ ' * https://github.com/marionettejs/backbone.wreqr/\n' +
+ ' * Includes EventBinder\n' +
+ ' * https://github.com/marionettejs/backbone.eventbinder\n' +
+ ' */',
+ banner_backbone_underscore :
+ '<%= meta.banner_core %>\n' +
+ '/*!\n' +
+ ' * Includes Backbone\n' +
+ ' * http://backbonejs.org/\n' +
+ ' * Includes underscore\n' +
+ ' * http://underscore.org/\n' +
+ ' */',
+ banner_backbone_underscore_jquery :
+ '<%= meta.banner_backbone_underscore %>\n' +
+ '/*!\n' +
+ ' * Includes jQuery\n' +
+ ' * http://www.jQuery.com/\n' +
+ ' */'
},
lint: {
files: ['src/marionette.*.js']
},
+ concat: {
+ core : {
+ src : [
+ 'public/javascripts/backbone.eventbinder.js',
+ 'public/javascripts/backbone.wreqr.js',
+ 'lib/backbone.marionette.js'
+ ],
+ dest : 'lib/bundles/marionette.core.js'
+ },
+ backbone_underscore : {
+ src : [
+ 'public/javascripts/underscore.js',
+ 'public/javascripts/backbone.js',
+ 'public/javascripts/backbone.eventbinder.js',
+ 'public/javascripts/backbone.wreqr.js',
+ 'lib/backbone.marionette.js'
+ ],
+ dest : 'lib/bundles/marionette.backbone_underscore.js'
+ },
+ backbone_underscore_jquery : {
+ src : [
+ 'public/javascripts/jquery.js',
+ 'public/javascripts/underscore.js',
+ 'public/javascripts/backbone.js',
+ 'public/javascripts/backbone.eventbinder.js',
+ 'public/javascripts/backbone.wreqr.js',
+ 'lib/backbone.marionette.js'
+ ],
+ dest : 'lib/bundles/marionette.backbone_underscore_jquery.js'
+ }
+ },
+
rig: {
build: {
src: ['<banner:meta.banner>', 'src/marionette.js'],
@@ -31,11 +88,38 @@ module.exports = function(grunt) {
min: {
standard: {
- src: ['<banner:meta.banner>', '<config:rig.build.dest>'],
+ src: [
+ '<banner:meta.banner>',
+ '<config:rig.build.dest>'
+ ],
dest: 'lib/backbone.marionette.min.js'
},
+ bundle_core: {
+ src: [
+ '<banner:meta.banner_core>',
+ '<config:concat.core.dest>'
+ ],
+ dest: 'lib/bundles/marionette.core.min.js'
+ },
+ bundle_backbone_underscore: {
+ src: [
+ '<banner:meta.banner_backbone_underscore>',
+ '<config:concat.backbone_underscore.dest>'
+ ],
+ dest: 'lib/bundles/marionette.backbone_underscore.min.js'
+ },
+ bundle_backbone_underscore_jquery: {
+ src: [
+ '<banner:meta.banner_backbone_underscore_jquery>',
+ '<config:concat.backbone_underscore_jquery.dest>'
+ ],
+ dest: 'lib/bundles/marionette.backbone_underscore_jquery.min.js'
+ },
amd: {
- src: ['<banner:meta.banner>', '<config:rig.amd.dest>'],
+ src: [
+ '<banner:meta.banner>',
+ '<config:rig.amd.dest>'
+ ],
dest: 'lib/amd/backbone.marionette.min.js'
}
},
@@ -102,6 +186,6 @@ module.exports = function(grunt) {
});
// Default task.
- grunt.registerTask('default', 'lint rig min');
+ grunt.registerTask('default', 'lint rig concat min');
};
Please sign in to comment.
Something went wrong with that request. Please try again.