karma-runner/karma-coffee-preprocessor

Name: karma-coffee-preprocessor

Owner: Karma

Description: A Karma plugin. Compile coffee script on the fly.

Created: 2013-02-09 02:59:44.0

Updated: 2017-08-31 20:47:32.0

Pushed: 2017-05-15 04:51:41.0

Homepage:

Size: 39

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

karma-coffee-preprocessor

js-standard-style npm version npm downloads

Build Status Dependency Status devDependency Status

Preprocessor to compile CoffeeScript on the fly.

Installation

The easiest way is to keep karma-coffee-preprocessor as a devDependency. You can simple do it by:

install karma-coffee-preprocessor --save-dev
Configuration

Following code shows the default configuration

arma.conf.js
le.exports = function(config) {
nfig.set({
preprocessors: {
  '**/*.coffee': ['coffee']
},

coffeePreprocessor: {
  // options passed to the coffee compiler
  options: {
    bare: true,
    sourceMap: false
  },
  // transforming the filenames
  transformPath: function(path) {
    return path.replace(/\.coffee$/, '.js')
  }
},

// make sure to include the .coffee files not the compiled .js files
files: [
  '**/*.coffee'
]


If you set the sourceMap coffee compiler option to true then the generated source map will be inlined as a data-uri.


For more information on Karma see the homepage.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.