0.2.2 • Published 10 years ago

karma-live-preprocessor v0.2.2

Weekly downloads
10
License
-
Repository
github
Last release
10 years ago

karma-live-preprocessor

Preprocessor to compile LiveScript on the fly.

Installation

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

{
  "devDependencies": {
    "karma": "~0.10.0",
    "karma-live-preprocessor": "~0.2.0"
  }
}

You can simple do it by:

npm install karma-live-preprocessor --save-dev

Configuration

Following code shows the default configuration...

// karma.conf.js
module.exports = function(config) {
  config.set({
    preprocessors: {
      '**/*.ls': 'live'
    },

    livePreprocessor: {
      // options passed to the live compiler
      options: {
        bare: true
      },
      // transforming the filenames
      transformPath: function(path) {
        return path.replace(/\.js$/, '.ls');
      }
    }
  });
};

Based on karma-coffee-preprocessor

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago