# karma-coffee-preprocessor

> A Karma plugin. Compile coffee script on the fly.

Latest version **1.0.1** (published 2016-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install karma-coffee-preprocessor
pnpm add karma-coffee-preprocessor
yarn add karma-coffee-preprocessor
bun add karma-coffee-preprocessor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-07-12 |
| First published | 2013-03-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 55 |
| Author | Vojta Jina |
| Maintainers | vojtajina, zzo, dignifiedquire |
| Keywords | karma-plugin, karma-preprocessor, coffee-script, coffee |

## Links

- npm: https://www.npmjs.com/package/karma-coffee-preprocessor
- Repository: https://github.com/karma-runner/karma-coffee-preprocessor
- Homepage: https://github.com/karma-runner/karma-coffee-preprocessor#readme
- Issues: https://github.com/karma-runner/karma-coffee-preprocessor/issues
- npm.io page: https://npm.io/package/karma-coffee-preprocessor

## Dependencies (2)

- [coffee-script](https://npm.io/package/coffee-script.md) ~1
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.0

## Recent versions

- 1.0.1 (latest) — 2016-07-12
- 1.0.0 — 2016-05-04
- 0.3.0 — 2015-07-09
- 0.2.1 — 2014-03-13
- 0.2.0 — 2014-03-11
- 0.1.3 — 2014-02-14
- 0.1.2 — 2013-12-26
- 0.1.1 — 2013-11-26
- 0.1.0 — 2013-08-06
- 0.0.4 — 2013-08-05
- 0.0.3 — 2013-07-19
- 0.0.2 — 2013-07-05
- 0.0.1 — 2013-03-20

## README

# karma-coffee-preprocessor

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/karma-runner/karma-coffee-preprocessor)
 [![npm version](https://img.shields.io/npm/v/karma-coffee-preprocessor.svg?style=flat-square)](https://www.npmjs.com/package/karma-coffee-preprocessor) [![npm downloads](https://img.shields.io/npm/dm/karma-coffee-preprocessor.svg?style=flat-square)](https://www.npmjs.com/package/karma-coffee-preprocessor)

[![Build Status](https://img.shields.io/travis/karma-runner/karma-coffee-preprocessor/master.svg?style=flat-square)](https://travis-ci.org/karma-runner/karma-coffee-preprocessor) [![Dependency Status](https://img.shields.io/david/karma-runner/karma-coffee-preprocessor.svg?style=flat-square)](https://david-dm.org/karma-runner/karma-coffee-preprocessor) [![devDependency Status](https://img.shields.io/david/dev/karma-runner/karma-coffee-preprocessor.svg?style=flat-square)](https://david-dm.org/karma-runner/karma-coffee-preprocessor#info=devDependencies)

> 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:
```bash
npm install karma-coffee-preprocessor --save-dev
```

## Configuration

Following code shows the default configuration

```js
// karma.conf.js
module.exports = function(config) {
  config.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].


[homepage]: http://karma-runner.github.com

---
_Source: https://npm.io/package/karma-coffee-preprocessor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
