From a9ac9a19074ea8fb1baa2dd3ec35507dc427d935 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 20 Jul 2016 18:03:20 +0300 Subject: [PATCH 1/2] Remove trailing whitespace from banner --- Gruntfile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 68af36b..2b2d0a1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,9 +5,9 @@ module.exports = function (grunt) { pkg: grunt.file.readJSON('package.json'), meta: { banner: '/**\n' + - ' * <%= pkg.name %> build:<%= grunt.template.today("yyyy-mm-dd") %> \n' + - ' * <%= pkg.homepage %> \n' + - ' * Copyright (c) <%= grunt.template.today("yyyy") %> VividCortex \n' + + ' * <%= pkg.name %> build:<%= grunt.template.today("yyyy-mm-dd") %>\n' + + ' * <%= pkg.homepage %>\n' + + ' * Copyright (c) <%= grunt.template.today("yyyy") %> VividCortex\n' + '**/\n\n' }, concat: { From 7c6cb71ebfea94ba06445bee28c1a1c5eb67df76 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 20 Jul 2016 18:03:51 +0300 Subject: [PATCH 2/2] Add @license tag to banner Minifiers like uglifyjs[0] and closure compiler[1] interpret this tag and preserve the license in the minified output. This makes it easier to comply with the MIT license (and most others) which requires: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. [0] https://github.com/mishoo/UglifyJS2#keeping-copyright-notices-or-other-comments [1] https://developers.google.com/closure/compiler/docs/js-for-compiler#tag-license --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 2b2d0a1..82606fd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,7 +5,7 @@ module.exports = function (grunt) { pkg: grunt.file.readJSON('package.json'), meta: { banner: '/**\n' + - ' * <%= pkg.name %> build:<%= grunt.template.today("yyyy-mm-dd") %>\n' + + ' * @license <%= pkg.name %> build:<%= grunt.template.today("yyyy-mm-dd") %>\n' + ' * <%= pkg.homepage %>\n' + ' * Copyright (c) <%= grunt.template.today("yyyy") %> VividCortex\n' + '**/\n\n'