diff --git a/Gruntfile.js b/Gruntfile.js index 88d935e6..e6d5e053 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -82,14 +82,19 @@ module.exports = function(grunt) { }, options: { standalone: 'JSZip', - ignore:['./lib/nodeBuffer.js','./lib/nodeBufferReader'] + ignore:['./lib/nodeBuffer.js','./lib/nodeBufferReader'], + postBundleCB: function(err, src, done) { + var license = require('fs').readFileSync('lib/license_header.js'); + done(err, license + src); + } } } }, uglify: { options: { report: 'gzip', - mangle: true + mangle: true, + preserveComments: 'some' }, all: { src: 'dist/jszip.js', diff --git a/lib/index.js b/lib/index.js index 092736a4..e7f6b631 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,12 +1,5 @@ 'use strict'; /** - -JSZip - A Javascript class for generating and reading zip files - - -(c) 2009-2012 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - Usage: zip = new JSZip(); zip.file("hello.txt", "Hello, World!").file("tempfile", "nothing"); diff --git a/lib/license_header.js b/lib/license_header.js new file mode 100644 index 00000000..741827a6 --- /dev/null +++ b/lib/license_header.js @@ -0,0 +1,8 @@ +/*! + +JSZip - A Javascript class for generating and reading zip files + + +(c) 2009-2012 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. +*/