buster-coffee
Advanced tools
Comparing version 0.1.2 to 0.1.3
var coffee = require("coffee-script"); | ||
function base64decode(input) { | ||
return new Buffer(input, 'base64').toString('utf-8'); | ||
return new Buffer(input, "base64").toString("utf-8"); | ||
} | ||
@@ -12,3 +12,3 @@ | ||
content: function () { | ||
if (coffeeResource.encoding === 'base64') { | ||
if (coffeeResource.encoding === "base64") { | ||
return coffeeResource.content() | ||
@@ -27,2 +27,3 @@ .then(base64decode).then(coffee.compile); | ||
configure: function (config) { | ||
if (config.environment === "node") { return; } | ||
config.on("load:resources", function (resourceSet) { | ||
@@ -29,0 +30,0 @@ var paths = resourceSet.loadPath.paths(); |
{ | ||
"name": "buster-coffee", | ||
"version": "0.1.2", | ||
"description": "Buster extension: Compiles CoffeeScript files before running tests", | ||
"version": "0.1.3", | ||
"description": "Buster.JS extension: Automatically compile CoffeeScript files before running tests", | ||
"homepage": "https://github.com/jodal/buster-coffee", | ||
@@ -6,0 +6,0 @@ "author": { |
# buster-coffee | ||
An extension for [buster.js](http://busterjs.org) to automatically compile your | ||
An extension for [Buster.JS](http://busterjs.org) to automatically compile your | ||
[CoffeeScript](http://coffeescript.org) files before running tests. | ||
@@ -29,3 +29,3 @@ | ||
See the `demo/` dir for an example project using Buster.js and buster-coffee to | ||
See the `demo/` dir for an example project using Buster.JS and buster-coffee to | ||
test a function that is implemented in CoffeeScript, using tests written in | ||
@@ -45,2 +45,7 @@ CoffeeScript. | ||
### 0.1.3 (2012-05-24) | ||
- Leave `.coffee` files untouched if the `environment` setting is set to | ||
`node`. Contributed by Stephen Moore. | ||
### 0.1.2 (2012-05-21) | ||
@@ -47,0 +52,0 @@ |
@@ -30,2 +30,14 @@ var buster = require("buster"); | ||
"leave .coffee files untouched if the environment is node": function () { | ||
this.config.environment = "node"; | ||
extension.configure(this.config); | ||
this.config.emit("load:resources", this.resourceSet); | ||
var paths = this.resourceSet.loadPath.paths(); | ||
assert.equals(paths.length, 3); | ||
assert.equals(paths[0], "/bar.js"); | ||
assert.equals(paths[1], "/cafe.coffee"); | ||
assert.equals(paths[2], "/diner.js"); | ||
}, | ||
"replaces .coffee files with .js and keeps the path order": function () { | ||
@@ -32,0 +44,0 @@ extension.configure(this.config); |
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
9651
154
67