3.0.1 • Published 9 years ago

karma-6to5-preprocessor v3.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
9 years ago

npm version npm downloads

karma-6to5-preprocessor

Preprocessor to compile ES6 on the fly with 6to5.

Installation

npm install karma-6to5-preprocessor --save-dev

Configuration

See 6to5 options for more details.

Given options properties are passed to 6to5.

In addition to the options property, you can configure the following options with functions because they may differ from file to file.

  • filename
  • sourceRoot
  • sourceMapName
  • sourceFileName

For example, inline sourcemap configuration would look like the following.

module.exports = function(config) {
  config.set({
    files: [
      'src/**/*.js',
      'test/**/*.js'
    ],
    preprocessors: {
      'src/**/*.js': ['6to5'],
      'test/**/*.js': ['6to5']
    },
    '6to5Preprocessor': {
      options: {
        sourceMap: 'inline'
      },
      filename: function(file) {
        return file.originalPath.replace(/\.js$/, '.es5.js');
      },
      sourceFileName: function(file) {
        return file.originalPath;
      }
    }
  });
};
3.0.1

9 years ago

3.0.0

9 years ago

1.0.0

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago