diff --git a/README.md b/README.md index cca5e41..950d82e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The module provides a single function to concatenate a list of JavaScript files ![Chrome Dev Tools screen shot](http://i.imgur.com/YPc20MJ.png) -- Demo: http://jsbin.com/isozid/2/quiet +- Demo: http://jsbin.com/isozid/3/quiet - npm: https://npmjs.org/package/concatenate-js ## When would you use it diff --git a/concatenate.js b/concatenate.js index 2438e42..8c88794 100644 --- a/concatenate.js +++ b/concatenate.js @@ -41,6 +41,10 @@ module.exports = function(files, opt_wrap) { var filename = sanitizeSingleLineComment(file.filename).replace(/^\//, ''); var hostname = sanitizeSingleLineComment(file.hostname || 'app'); var url = 'http://' + hostname + '/' + filename; + // //# is the new format. This was changed from //@ due to an + // incompatibility with IE conditional compilation. For now we support + // both. + content += '\n//# sourceURL=' + url; content += '\n//@ sourceURL=' + url; var js = 'eval(' + JSON.stringify(content) + ');\n';