0.2.0 • Published 9 years ago

karma-js2js-preprocessor v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

karma-js2js-preprocessor

Preprocessor for converting js files into js variables

Installation

Using npm:

npm install karma-js2js-preprocessor --save-dev

Configuration

Following code shows the default configuration:

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

    files: [
      '**/*.js'
    ]
  });
};

How does it work ?

This preprocessor converts JS files into js source functions and publishes them in the global window.__fixtures__.

window.__fixtures__['es6/arrow_functions/example_1'] = "(a ...b) => 0";
window.__fixtures__['es6/arrow_functions/example_rest_1'] = "(a,b,...c) => 0;";

For more information on Karma see the homepage.