You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
have a license file (let's say header.txt) where I've compressed the licenses from all my modules into one.
/*!
...
* This is the optimized build that have license headers removed
* to save some bandwidth.
*
* Full description and individual module sources and licenses are
* available at https://github.com/someUser/someProject
/*
I expect to be able to node r.js -o baseUrl=../src/js out=file.js preserveLicenseComments=false wrap.startFile=header.txt wrap.endFile=footer.txt to strip all the original license comments, but still add my own in the top, but for me the contents from header.txt is stripped to.
The text was updated successfully, but these errors were encountered:
Assigning for consideration in 1.1. In the meantime, you could use the onBuildWrite to work around this behavior: in the onBuildWrite, if it is not the wrap file, strip out the comments manually. See this article for info on onBuildWrite:
Looking more at it, onBuildWrite will not work, and the license comment trimming happens as part of the full file optimizations, where pragmas and also minification is done. So this will not be able to be supported. the best thing to do is to use a post-r.js build step to add the header back after final optimizations.
have a license file (let's say
header.txt
) where I've compressed the licenses from all my modules into one.I expect to be able to
node r.js -o baseUrl=../src/js out=file.js preserveLicenseComments=false wrap.startFile=header.txt wrap.endFile=footer.txt
to strip all the original license comments, but still add my own in the top, but for me the contents fromheader.txt
is stripped to.The text was updated successfully, but these errors were encountered: