Comparing version 1.6.0 to 1.6.1
// Generated by CoffeeScript 1.7.1 | ||
(function() { | ||
var CSON, ambi, coffee, extractOpts, fsUtil, js2coffee, pathUtil, requireFreshSafe, wait; | ||
var CSON, ambi, coffee, extractOpts, fsUtil, isJsOrCoffee, isJsonOrCson, js2coffee, pathUtil, requireFreshSafe, wait; | ||
@@ -25,2 +25,10 @@ coffee = require('coffee-script'); | ||
isJsOrCoffee = function(filePath) { | ||
return /\.(js|coffee)$/.test(filePath); | ||
}; | ||
isJsonOrCson = function(filePath) { | ||
return /\.(json|cson)$/.test(filePath); | ||
}; | ||
CSON = { | ||
@@ -31,5 +39,5 @@ parseFile: function(filePath, opts, next) { | ||
filePath = pathUtil.resolve(filePath); | ||
if (/\.(js|coffee)$/.test(filePath)) { | ||
if (isJsOrCoffee(filePath)) { | ||
requireFreshSafe(filePath, next); | ||
} else if (/\.(json|cson)$/.test(filePath)) { | ||
} else if (isJsonOrCson(filePath)) { | ||
fsUtil.readFile(filePath, (function(_this) { | ||
@@ -56,3 +64,3 @@ return function(err, data) { | ||
filePath = pathUtil.resolve(filePath); | ||
if (/\.(js|coffee)$/.test(filePath)) { | ||
if (isJsOrCoffee(filePath)) { | ||
try { | ||
@@ -64,3 +72,3 @@ return result = requireFreshSafe(filePath); | ||
} | ||
} else if (/\.(json|cson)$/.test(filePath)) { | ||
} else if (isJsonOrCson(filePath)) { | ||
data = fsUtil.readFileSync(filePath); | ||
@@ -67,0 +75,0 @@ opts.filename = filePath; |
{ | ||
"title": "CSON", | ||
"name": "cson", | ||
"version": "1.6.0", | ||
"description": "CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects", | ||
"version": "1.6.1", | ||
"description": "CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects.", | ||
"homepage": "https://github.com/bevry/cson", | ||
@@ -43,2 +43,3 @@ "license": { | ||
"Ryan LeFevre <meltingice8917@gmail.com> (https://github.com/meltingice)", | ||
"Zearin (https://github.com/Zearin)", | ||
"Zhang Cheng <czhang.oss@gmail.com> (https://github.com/zhangcheng)" | ||
@@ -60,3 +61,3 @@ ], | ||
"extract-opts": "~2.2.0", | ||
"js2coffee": "~0.3.0", | ||
"js2coffee": "~0.3.1", | ||
"requirefresh": "~1.1.2" | ||
@@ -66,5 +67,5 @@ }, | ||
"chai": "~1.9.0", | ||
"joe": "~1.3.0", | ||
"joe": "~1.5.0", | ||
"joe-reporter-console": "~1.2.1", | ||
"projectz": "~0.3.10" | ||
"projectz": "~0.3.15" | ||
}, | ||
@@ -71,0 +72,0 @@ "directories": { |
@@ -186,2 +186,3 @@ <!-- TITLE/ --> | ||
- [Ryan LeFevre](https://github.com/meltingice) <meltingice8917@gmail.com> — [view contributions](https://github.com/bevry/cson/commits?author=meltingice) | ||
- [Zearin](https://github.com/Zearin) — [view contributions](https://github.com/bevry/cson/commits?author=Zearin) | ||
- [Zhang Cheng](https://github.com/zhangcheng) <czhang.oss@gmail.com> — [view contributions](https://github.com/bevry/cson/commits?author=zhangcheng) | ||
@@ -188,0 +189,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
17162
168
206
Updatedjs2coffee@~0.3.1