如何让 Closure Compiler 忽略 JSDoc 注释?
我使用 Google Closure 编译器组合的大约 15 个 JavaScript 文件之一在其注释之一中包含标签 @license WTFPL
。
因此,闭包编译器将我们的整个 JavaScript 集标记为全部都在 WTFPL 下获得许可。
显然,这是不可取的 - 即使只是因为我们无法在 WTFPL 下重新许可大部分代码。我怎样才能关闭它?
One of the 15 or so JavaScript files I'm combining using the Google Closure Compiler contains the tag @license WTFPL
in one of its comments.
As a result, the Closure Compiler labels our entire set of JavaScript as if it were all licensed under WTFPL.
Obviously this is undesirable - even if just because we can't relicense much of this code under WTFPL. How can I turn this off?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现在编译输出上重新运行闭包编译器将删除包含许可证的注释块。
不确定这是否适合您的情况,但在我的情况下(缩小一组 jQuery 工具 脚本),效果很好我不需要任何其他操作。
I've found re-running the closure compiler on the compiled output will get rid of the comment block containing the license.
Not sure if this would be desired in your case, but in mine (minifying a set of jQuery Tools scripts) it worked well and I didn't need any other manipulation.
没有内置任何东西可以做到这一点。您的选择是:
There is nothing built in that will do that. Your options are: