Skip to content

gjurgens/karma-renamer-preprocessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

karma-renamer-preprocessor

A Karma plugin. Rename served files on the fly.

Installation

npm install karma-renamer-preprocessor --save-dev

Configuration

Simple configuration

You just need to declare what files should be renamed

// karma.conf.js
module.exports = function(config) {
  config.set({
    preprocessors: {
      '**/*.js': ['renamer']
    },
    renamerPreprocessor: {
      // transforming the filenames
      transformPath: function(path) {
        return path.replace(/\.js$/, '.sufix.js');
      }
    }
  });
};

For more information on Karma see the homepage.

About

A simple preprocessor for rename served files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published