Skip to content

Commit

Permalink
Use more powerful jsesc instead of js-string-escape
Browse files Browse the repository at this point in the history
  • Loading branch information
joliss committed Jan 2, 2014
1 parent 66738bb commit 0a9f14c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = function (broccoli) {
var path = require('path')
var mkdirp = require('mkdirp')
var ES6Transpiler = require('es6-module-transpiler').Compiler
var jsStringEscape = require('js-string-escape')
var jsesc = require('jsesc')

ES6ConcatenatorCompiler.prototype = Object.create(broccoli.Compiler.prototype)
ES6ConcatenatorCompiler.prototype.constructor = ES6ConcatenatorCompiler
Expand Down Expand Up @@ -107,10 +107,10 @@ module.exports = function (broccoli) {
function wrapInEval (fileContents, fileName) {
// Should pull out copyright comment headers
// Eventually we want source maps instead of sourceURL
return 'eval("' +
jsStringEscape(fileContents) +
'//# sourceURL=' + jsStringEscape(fileName) +
'");\n'
return "eval('" +
jsesc(fileContents) +
"//# sourceURL=" + jsesc(fileName) +
"');\n"
}

return ES6ConcatenatorCompiler
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"es6-module-transpiler": "0.3.6",
"js-string-escape": "~1.0.0",
"jsesc": "~0.4.3",
"mkdirp": "~0.3.5"
}
}

0 comments on commit 0a9f14c

Please sign in to comment.