karma-prerollup-plugin
A Karma preprocessor plugin to offer seamless integration with Rollup.
Last updated 3 years ago by shyam-chen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install karma-prerollup-plugin 
SYNC missed versions from official npm registry.

karma-prerollup-plugin Build Status

A Karma preprocessor plugin to offer seamless integration with Rollup.

Install

$ npm i karma-prerollup-plugin -D

Usage

// karma.conf.js
module.exports = config => {
  config.set({
    // ...
    preprocessors: {
      'src/polyfills.js': ['prerollup'],
      'src/vendor.js': ['prerollup'],
      'src/**/*.spec.js': ['rollup']
    },
    prerollupPreprocessor: {
      plugins: [
        postcss({ plugins: [cssnano()] }),
        babel({
          babelrc: false,
          presets: [['latest', { es2015: { modules: false } }]],
          plugins: ['external-helpers'],
          exclude: 'node_modules/**'
        }),
        globals(),
        builtins(),
        resolve({ jsnext: true, browser: true }),
        commonjs({ include: 'node_modules/**' }),
        replace({ eval: '[eval][0]' }),
        uglify()
      ],
      format: 'iife'
    },
    rollupPreprocessor: {
      plugins: [
        // ...
      ],
      format: 'iife',
      sourceMap: 'inline'
    },
    // ...
  });
};

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 5
Dependencies (1)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |