Giter Site home page Giter Site logo

flosse / buster-coffee Goto Github PK

View Code? Open in Web Editor NEW

This project forked from busterjs/buster-coffee

1.0 3.0 0.0 199 KB

Buster.JS extension that automatically compile CoffeeScript files before running tests

License: BSD 2-Clause "Simplified" License

CoffeeScript 5.13% JavaScript 94.87%

buster-coffee's Introduction

buster-coffee

Build Status

An extension for Buster.JS to automatically compile your CoffeeScript files before running tests.

Installation

Install from npm:

npm install buster-coffee

Then add it to your buster.js config file:

config["My tests"] = {
  // ...
  extensions: [require("buster-coffee")]
  // ...
};

Configuration

The extension has no configuration options.

Example web project

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 CoffeeScript.

Node.js and require()

Currently, buster-coffee does not work with files that are to be included using require(). buster-coffee never writes any files to disk, while require() explictly looks for the files it will include on disk. Because of this, buster-coffee has limited use for Node.js development in CoffeeScript.

AMD and CoffeeScript

If you are using buster-amd, you don't need buster-coffee to compile your CoffeeScript files. All you need to do is set up buster-amd's pathMapper to prefix CoffeeScript files with cs! and remove the .coffee suffix. Here's a naive implementation to get you going:

config["My tests"] = {
  // ..
  extensions: [require("buster-amd")],
  "buster-amd": {
    // Load tests written in CoffeeScript as AMD modules
    pathMapper: function (path) {
      return "cs!" + path.replace(/^\//, "").replace(/\.coffee$/, "");
    }
  },
  // ..
};

Changelog

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)

  • Remove unused dependency on when.

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)

  • Initial release.

License

Copyright 2012, Stein Magnus Jodal.

Released under the Simplified BSD license. See the LICENSE file for details.

buster-coffee's People

Contributors

delfick avatar jodal avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.