@ -203,7 +203,14 @@ function fixComments(ctx, node) {
while (i < node.leadingComments.length) {
var type = node.leadingComments[i].type;
var value = node.leadingComments[i].value;
if (type === 'Block' &&
if (ctx.saveComments === 'copyright') {
// Remove all comments, except Copyright notices and License headers.
if (!(type === 'Block' && /\bcopyright\b/i.test(value))) {
node.leadingComments.splice(i, 1);
continue;
}
} else if (type === 'Block' &&
/^\s*(globals|jshint|falls through|umdutils)\b/.test(value)) {
@ -133,7 +133,7 @@ function bundle(filename, outfilename, pathPrefix, initFiles, amdName, defines,
var p2 = require('./external/builder/preprocessor2.js');
var ctx = {
rootPath: __dirname,
saveComments: true,
saveComments: 'copyright',
defines: builder.merge(defines, {
BUNDLE_VERSION: versionInfo.version,
BUNDLE_BUILD: versionInfo.commit,