Skip to content

Commit

Permalink
Cleanup Grunt banners
Browse files Browse the repository at this point in the history
- Add a contributors section to the JSON based on the existing people in
the block. Removed Ryan Seddon since he has since been added as an
author
- Removed base banner since it wasn't used
- Renamed microbanner to compact
- Moved old license object to 'full' banner to use grunt template
replacements
  • Loading branch information
nschonni committed Mar 18, 2013
1 parent d1e583f commit 8996f47
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 31 deletions.
57 changes: 26 additions & 31 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,40 @@ requirejs.config({

var generateInit = requirejs('generate');

var license = '/*!\n' +
' * Modernizr v3.0.0pre\n' +
' * modernizr.com\n' +
' *\n' +
' * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton\n' +
' * MIT License\n' +
'*/\n' +
' \n' +
'/*\n' +
' * Modernizr tests which native CSS3 and HTML5 features are available in the\n' +
' * current UA and makes the results available to you in two ways: as properties on\n' +
' * a global `Modernizr` object, and as classes on the `<html>` element. This\n' +
' * information allows you to progressively enhance your pages with a granular level\n' +
' * of control over the experience.\n' +
' *\n' +
' * Modernizr has an optional (*not included*) conditional resource loader called\n' +
' * `Modernizr.load()`, based on [Yepnope.js](http://yepnopejs.com). You can get a\n' +
' * build that includes `Modernizr.load()`, as well as choosing which feature tests\n' +
' * to include on the [Download page](http://www.modernizr.com/download/).\n' +
' *\n' +
' *\n' +
' * Authors Faruk Ates, Paul Irish, Alex Sexton\n' +
' * Contributors Ryan Seddon, Ben Alman\n' +
' */';

module.exports = function( grunt ) {
'use strict';

var modConfig = grunt.file.readJSON('lib/config-all.json');

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '/*!\n' +
banner: {
compact: '/*! <%= pkg.name %> <%= pkg.version %> (Custom Build) | <%= pkg.license %> */',
full: '/*!\n' +
' * <%= pkg.name %> v<%= pkg.version %>\n' +
' * modernizr.com\n *\n' +
' * Copyright (c) <%= pkg.author %>\n' +
' * <%= pkg.license %> License\n */',
microbanner: '/*! <%= pkg.name %> <%= pkg.version %> (Custom Build) | <%= pkg.license %> */'
' * <%= pkg.license %> License\n */' +
' \n' +
'/*\n' +
' * Modernizr tests which native CSS3 and HTML5 features are available in the\n' +
' * current UA and makes the results available to you in two ways: as properties on\n' +
' * a global `Modernizr` object, and as classes on the `<html>` element. This\n' +
' * information allows you to progressively enhance your pages with a granular level\n' +
' * of control over the experience.\n' +
' *\n' +
' * Modernizr has an optional (*not included*) conditional resource loader called\n' +
' * `Modernizr.load()`, based on [Yepnope.js](http://yepnopejs.com). You can get a\n' +
' * build that includes `Modernizr.load()`, as well as choosing which feature tests\n' +
' * to include on the [Download page](http://www.modernizr.com/download/).\n' +
' *\n' +
' *\n' +
' * Authors <%= pkg.author %>\n' +
' * Contributors <%= pkg.contributors %>\n' +
' */'
},
meta: {

},
qunit: {
files: ['test/index.html']
Expand All @@ -64,7 +59,7 @@ module.exports = function( grunt ) {
uglify : {
options: {
stripbanners: true,
banner: '<%= meta.microbanner %>',
banner: '<%= banner.compact %>',
mangle: {
except: ['Modernizr']
}
Expand Down Expand Up @@ -143,7 +138,7 @@ module.exports = function( grunt ) {
}],
fileExclusionRegExp: /^(.git|node_modules|modulizr|media|test)$/,
wrap: {
start: license + "\n;(function(window, document, undefined){",
start: '<%= banner.full %>' + "\n;(function(window, document, undefined){",
end: "})(this, document);"
},
onBuildWrite: function (id, path, contents) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
"feature detection"
],
"author": "Faruk Ates, Paul Irish, Alex Sexton, Ryan Seddon, Alexander Farkas",
"contributors": "Ben Alman",
"license": "MIT"
}

0 comments on commit 8996f47

Please sign in to comment.