Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buster-coffee

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buster-coffee - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

test/buster-coffee-test.js

41

lib/buster-coffee.js

@@ -0,4 +1,41 @@

var when = require("when");
var coffee = require("coffee-script");
function base64decode(input) {
return new Buffer(input, 'base64').toString('utf-8');
}
function compileCoffeeResource(resourceSet, coffeePath, jsPath) {
var coffeeResource = resourceSet.get(coffeePath);
resourceSet.addResource({
path: jsPath,
content: function () {
if (coffeeResource.encoding === 'base64') {
return coffeeResource.content()
.then(base64decode).then(coffee.compile);
} else {
return coffeeResource.content().then(coffee.compile);
}
}
});
}
module.exports = {
coffee: require("./coffee"),
extension: require("./extension")
name: "buster-coffee",
configure: function (config) {
config.on("load:resources", function (resourceSet) {
var paths = resourceSet.loadPath.paths();
resourceSet.loadPath.clear();
paths.forEach(function (path) {
if (/\.coffee$/.test(path)) {
var jsPath = path + ".js";
compileCoffeeResource(resourceSet, path, jsPath);
resourceSet.loadPath.append(jsPath);
} else {
resourceSet.loadPath.append(path);
}
});
});
}
};

3

package.json
{
"name": "buster-coffee",
"version": "0.1.0",
"version": "0.1.1",
"description": "Buster extension: Compiles CoffeeScript files before running tests",

@@ -12,2 +12,3 @@ "homepage": "https://github.com/jodal/buster-coffee",

"repository": {
"type": "git",
"url": "git://github.com/jodal/buster-coffee.git"

@@ -14,0 +15,0 @@ },

@@ -39,3 +39,3 @@ # buster-coffee

explictly looks for the files it will include on disk. Because of this,
buster-coffee has limited use for Node.js developement in CoffeeScript.
buster-coffee has limited use for Node.js development in CoffeeScript.

@@ -45,2 +45,6 @@

### 0.1.1 (2012-05-20)
- Use the coffee-script module's API instead of executing the `coffee` command.
### 0.1.0 (2012-05-20)

@@ -47,0 +51,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc