npm

Need private packages and team management tools?Check out npm Orgs. »

karma-js2js-preprocessor

0.2.0 • Public • Published

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.

install

npm i karma-js2js-preprocessor

Downloadsweekly downloads

3

version

0.2.0

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability