-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When bundling with glslify, comments are not removed from the final source string. I'm trying to the output to be as packed as possible. I am currently using a custom function in my own fork of glslify-bundle that does the trick:
function strip_comments(tokens) {
for (var i = 1; i < tokens.length; i++) {
var token = tokens[i]
if (token.type == 'block-comment' || token.type == 'line-comment') {
tokens.splice(i--, 1);
}
}
return tokens
}
then in the Bundle function I just do:
this.src = string(clean(strip_comments(trim(tokenize(this.src), true))))
Would you accept a PR for this change?
Metadata
Metadata
Assignees
Labels
No labels