# karma-ng-classify-preprocessor

> Karma preprocessor for ng-classify

Latest version **1.0.1** (published 2015-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install karma-ng-classify-preprocessor
pnpm add karma-ng-classify-preprocessor
yarn add karma-ng-classify-preprocessor
bun add karma-ng-classify-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 | 2015-04-16 |
| First published | 2015-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jonathan Chapman |
| Maintainers | chafnan |
| Keywords | karma, preprocessor, ng-classify |

## Links

- npm: https://www.npmjs.com/package/karma-ng-classify-preprocessor
- Repository: https://github.com/chafnan/karma-ng-classify-preprocessor
- Issues: https://github.com/chafnan/karma-ng-classify-preprocessor/issues
- npm.io page: https://npm.io/package/karma-ng-classify-preprocessor

## Dependencies (1)

- [ng-classify](https://npm.io/package/ng-classify.md) ^4.1.1

## Recent versions

- 1.0.1 (latest) — 2015-04-16
- 1.0.0 — 2015-04-10

## README

# karma-ng-classify-preprocessor

> Preprocessor to complie ng-classify on the fly.

## Installation

Can be simply done through `npm`:

```
npm install karma-ng-classify-preprocessor --save-dev
```

## Configuration
This is the default configuration..
```js
module.exports = function(config) {
  config.set({
    preprocessors: {
     '**/*.coffee': ['ng-classify']
    },
    ngClassifyPreprocessor: {
      // options passed to ng-classify
      options: {
	// any options supported by ng-classify
	// https://github.com/CaryLandholt/ng-classify#api
        sourceMap: false
      },
      transformPath: function(path) {
        return path.replace(/\.coffee$/, '.js');
      },
      transformAppName: function(path) {
      	// function to change app name determined by path
        // this function will overwrite the `appName` option
      	return 'app';
      }
    }
  });
}
```

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

---
Credit to the [karma-coffee-preprocessor] for example on writing this plugin.

[karma-coffee-preprocessor]: https://github.com/karma-runner/karma-coffee-preprocessor

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