Skip to content

power-assert-js/karma-espower-preprocessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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');
      }
    }
  });
};

About

Karma preprocessor for power-assert

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •