Skip to content

Commit 1159aea

Browse files
committed
build: custom comment preservation function for uglify
preserveComments: 'some' didn't work properly (it preserved all comments), so we now use our own, which only leaves license.
1 parent cf5babb commit 1159aea

File tree

2 files changed

+5
-67
lines changed

2 files changed

+5
-67
lines changed

Gruntfile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ module.exports = function(grunt) {
140140
uglify: {
141141
scrypt: {
142142
options: {
143-
preserveComments: 'some'
143+
preserveComments: function(node, comment) {
144+
return comment && comment.value && comment.value.length &&
145+
comment.value[0] === "!";
146+
}
144147
},
145148
files: {
146149
'scrypt-async.min.js' : [ 'scrypt-async.js' ]

scrypt-async.min.js

Lines changed: 1 addition & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)