Karma preprocessor for power-assert
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore first commit! Oct 27, 2014
README.md add ignoreUpstreamSourceMap option May 8, 2016
index.js add ignoreUpstreamSourceMap option May 8, 2016
package.json bump version May 8, 2016

README.md

karma-espower-preprocessor

Preprocess source code by espower-source

sample

Installation

npm install karma-espower-preprocessor --save-dev

I'm recommend to use with karma-sourcemap-loader if you use some altJS.

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    preprocessors: {
      '**/*.js': ['espower']
      // '**/*.js': ['sourcemap', 'espower']
    },

    espowerPreprocessor: {
      options: {
        // emit espowerified code.
        // default: false (in-memory)
        emitActualCode: true,
        // ignore upstream SourceMap info.
        // default: false
        ignoreUpstreamSourceMap: false
      },
      transformPath: function(path) {
        // default
        return path.replace(/\.js$/, '.espowered.js');
      }
    }
  });
};