connect-coffee-script
Advanced tools
Comparing version 0.1.5 to 0.1.6
// Generated by CoffeeScript 1.6.3 | ||
var clone, coffeeScript, debug, fs, mkdirp, path, url; | ||
var clone, coffeeScript, debug, fs, mkdirp, path, prettyErrorMessage, url; | ||
coffeeScript = require('coffee-script'); | ||
prettyErrorMessage = require('coffee-script/lib/coffee-script/helpers').prettyErrorMessage; | ||
fs = require('fs'); | ||
@@ -62,3 +64,10 @@ | ||
options.compile = function(str, options) { | ||
return coffeeScript.compile(str, clone(options)); | ||
var err; | ||
try { | ||
return coffeeScript.compile(str, clone(options)); | ||
} catch (_error) { | ||
err = _error; | ||
err.message = prettyErrorMessage(err, options.filename, str, false); | ||
throw err; | ||
} | ||
}; | ||
@@ -110,7 +119,3 @@ } | ||
mapPath = ((_ref = options.sourceMapRoot) != null ? _ref : '') + pathname.replace(/\.js$/, '.map'); | ||
} | ||
if (options.newPrefix) { | ||
mapFooter = "//# sourceMappingURL=" + mapPath + "\n"; | ||
} else { | ||
mapFooter = "//@ sourceMappingURL=" + mapPath + "\n"; | ||
mapFooter = "//# sourceMappingURL=" + mapPath + "\n//@ sourceMappingURL=" + mapPath; | ||
js = "" + js + "\n\n" + mapFooter; | ||
@@ -117,0 +122,0 @@ } |
{ | ||
"name": "connect-coffee-script", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Simple connect middleware to serve CoffeeScript files", | ||
"homepage": "https://github.com/wdavidw/node-connect-coffee-script", | ||
"author": "David Worms <david@adaltas.com>", | ||
"author": "David Worms <david@adaltas.com> (http://www.adaltas.com)", | ||
"contributors": [ | ||
{ "name": "David Worms", "email": "david@adaltas.com" }, | ||
{ "name": "Dave Wasmer", "email": "davewasmer@gmail.com" }, | ||
{ "name": "Simon Lydell" }, | ||
{ "name": "Garry Yao", "email": "yaojun85@gmail.com" }, | ||
{ "name": "Vishnu Iyengar" } | ||
"David Worms <david@adaltas.com> (http://www.adaltas.com)", | ||
"Dave Wasmer <davewasmer@gmail.com> (https://github.com/davewasmer)", | ||
"Simon Lydell (https://github.com/lydell)", | ||
"Garry Yao <yaojun85@gmail.com> (https://github.com/garryyao)", | ||
"Vishnu Iyengar (https://github.com/pathsny)", | ||
"Junyuan (https://github.com/conan007ai)" | ||
], | ||
@@ -14,0 +15,0 @@ "engines": { "node": ">= 0.6.0" }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52563
166