connect-coffee-script
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.2 | ||
// Generated by CoffeeScript 1.6.3 | ||
var clone, coffeeScript, debug, fs, mkdirp, path, url; | ||
@@ -18,3 +18,2 @@ | ||
var obj, prop, val; | ||
if (typeof src !== 'object') { | ||
@@ -45,4 +44,3 @@ return; | ||
module.exports = function(options) { | ||
var baseDir, dest, src, _ref; | ||
var baseDir, dest, src; | ||
if (options == null) { | ||
@@ -64,3 +62,3 @@ options = {}; | ||
dest = path.resolve(baseDir, dest); | ||
if ((_ref = options.compile) == null) { | ||
if (options.compile == null) { | ||
options.compile = function(str, options) { | ||
@@ -72,3 +70,2 @@ return coffeeScript.compile(str, clone(options)); | ||
var coffeePath, compile, error, jsPath, pathname; | ||
if ('GET' !== req.method && 'HEAD' !== req.method) { | ||
@@ -86,3 +83,2 @@ return next(); | ||
var arg; | ||
arg = 'ENOENT' === err.code ? null : err; | ||
@@ -95,3 +91,2 @@ return next(arg); | ||
var js, map, result; | ||
if (err) { | ||
@@ -113,4 +108,3 @@ return error(err); | ||
return mkdirp(path.dirname(jsPath), 0x1c0, function(err) { | ||
var mapFile, mapFooter, mapPath, _ref1; | ||
var mapFile, mapFooter, mapPath, _ref; | ||
if (err) { | ||
@@ -121,3 +115,7 @@ return error(err); | ||
mapFile = jsPath.replace(/\.js$/, '.map'); | ||
mapPath = ((_ref1 = options.sourceMapRoot) != null ? _ref1 : '') + pathname.replace(/\.js$/, '.map'); | ||
mapPath = ((_ref = options.sourceMapRoot) != null ? _ref : '') + pathname.replace(/\.js$/, '.map'); | ||
} | ||
if (options.newPrefix) { | ||
mapFooter = "//# sourceMappingURL=" + mapPath + "\n"; | ||
} else { | ||
mapFooter = "//@ sourceMappingURL=" + mapPath + "\n"; | ||
@@ -124,0 +122,0 @@ js = "" + js + "\n\n" + mapFooter; |
{ | ||
"name": "connect-coffee-script", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Simple connect middleware to serve CoffeeScript files", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/wdavidw/node-connect-coffee-script", |
@@ -26,10 +26,11 @@ [![Build Status](https://secure.travis-ci.org/wdavidw/node-connect-coffee-script.png)](http://travis-ci.org/wdavidw/node-connect-coffee-script) | ||
* `force` Always re-compile | ||
* `src` Source directory used to find .coffee files | ||
* `dest` Destination directory used to output .js files when undefined defaults to `src` | ||
* `compile` Custom compile function, accepting the arguments `(str, options)` | ||
* `bare` Compile without a top-level function wrapper | ||
* `baseDir` Base directory for path resolution | ||
* `prefix` Path which should be stripped from `src` | ||
* `sourceMap` Generates source map files | ||
* `force` Always re-compile | ||
* `src` Source directory used to find .coffee files | ||
* `dest` Destination directory used to output .js files when undefined defaults to `src` | ||
* `compile` Custom compile function, accepting the arguments `(str, options)` | ||
* `bare` Compile without a top-level function wrapper | ||
* `baseDir` Base directory for path resolution | ||
* `newPrefix` Use the new declaration (`//#` instead of `//@`) | ||
* `prefix` Path which should be stripped from `src` | ||
* `sourceMap` Generates source map files | ||
* `sourceMapRoot` but added back to the sourceMap url. | ||
@@ -36,0 +37,0 @@ |
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
51837
162
111