karma-mincer-preprocessor

0.0.2 • Public • Published

karma-mincer-preprocessor

Preprocessor to use http://github.com/nodeca/mincer for compilation.

Installation

The easiest way is to keep karma-mincer-preprocessor as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-coffee-preprocessor": "~0.0.1"
  }
}

You can simple do it by:

npm install karma-mincer-preprocessor --save-dev

Configuration

Following code shows the default configuration...

// karma.conf.js
module.exports = function(config) {
  config.set({
    preprocessors: {
      '**/*.js': ['mincer']
    },
 
    mincerPreprocessor: {
      options: {
        // paths mincer will use to search for assets in
        paths: [],
        // optionally define a function which will receive
        // the mincer environment to allow you to set further
        // configuration options or register helpers
        init: function (environment, options) {
          environment.registerHelper('value-to-be-used', function () {
            // see https://github.com/nodeca/mincer#using-helpers
          });
        }
      }
    }
  });
};

Readme

Keywords

none

Package Sidebar

Install

npm i karma-mincer-preprocessor

Weekly Downloads

9

Version

0.0.2

License

MIT

Last publish

Collaborators

  • cgc