Permalink
Browse files

Just coffee, no longer have to compile to javascript

  • Loading branch information...
1 parent 3299977 commit bdcb9f5648272c22d4ab7f21d497e11d3c91084c @quangv committed Jan 13, 2012
Showing with 3 additions and 73 deletions.
  1. +0 −69 cakes.js
  2. +0 −3 compiler
  3. +2 −0 index.js
  4. +1 −1 package.json
View
69 cakes.js
@@ -1,69 +0,0 @@
-(function() {
- var colors, depict, func, name, _ref,
- __slice = Array.prototype.slice;
-
- colors = require('colors');
-
- exports.Feature = function() {
- var callback, feature, message, part, story, _i, _j, _len;
- feature = arguments[0], story = 3 <= arguments.length ? __slice.call(arguments, 1, _i = arguments.length - 1) : (_i = 1, []), callback = arguments[_i++];
- message = ("Feature: " + feature + " \n\n").green.underline;
- for (_j = 0, _len = story.length; _j < _len; _j++) {
- part = story[_j];
- message += '\t' + part + '\n';
- }
- describe(message, callback);
- };
-
- depict = function(label, args) {
- if (args.length === 1) {
- args[1] = args[0];
- label = '';
- }
- return describe(label.replace('%s', args[0]), args[1]);
- };
-
- /*
- exports.Background = (action, callback)->
- depict action.magenta, arguments
- */
-
- exports.Scenario = function() {
- return depict("\n Scenario: %s".green, arguments);
- };
-
- exports.Given = function() {
- return depict("Given:".yellow + " %s", arguments);
- };
-
- exports.When = function() {
- return depict(" When:".yellow + " %s", arguments);
- };
-
- exports.And = function() {
- return depict(" and".grey + " %s", arguments);
- };
-
- exports.Then = function() {
- return depict(" Then:".yellow + " %s", arguments);
- };
-
- exports.But = function() {
- return depict(" But".yellow + " %s", arguments);
- };
-
- exports.Spec = function() {
- return depict('%s'.blue, arguments);
- };
-
- exports.step = function(title, fn) {
- return it(title, fn);
- };
-
- _ref = module.exports;
- for (name in _ref) {
- func = _ref[name];
- global[name] = func;
- }
-
-}).call(this);
View
3 compiler
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-coffee --watch --compile cakes.coffee
View
2 index.js
@@ -0,0 +1,2 @@
+require('coffee-script');
+module.exports = require('./cakes.coffee');
View
2 package.json
@@ -8,5 +8,5 @@
, "devDependencies" : { "coffee-script" : "*"
}
, "keywords" : ["mocha", "bdd", "stories", "cucumber", "test"]
- , "main" : "cakes"
+ , "main" : "./index.js"
}

0 comments on commit bdcb9f5

Please sign in to comment.