Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

karma-rollup-preprocessor

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-rollup-preprocessor

A rollup preprocessor for Karma

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

karma-rollup-preprocessor

Build Status npm version npm downloads

Preprocessor to bundle ES6 modules fly with rollup.

This preprocessor is mainly used to bundle your spec entry point but might be useful in other cases as well.

Installation

npm install karma-rollup-preprocessor --save-dev

Configuration

The rollupPreprocessor configuration is optional. (You'll need to install more dependencies). It takes two keys: rollup and bundle.

rollup is the configuration object for rollup (See rollup.rollup for more details).

bundle is the configuration object used when generating the bundle (See bundle.generate for more details) Notice this is preprocessor and does not write a file or return the bundle, only the content of the processed file gets changed. So when adding the sourceMaps options, inline is the only logical value.

Example

module.exports = function (config) {
  config.set({
    preprocessors: {
      'test/main.js': ['rollup']
    },
    rollupPreprocessor: {
      rollup: {
        plugins: [
          require('rollup-plugin-babel')({
            presets: [
              require('babel-preset-es2015-rollup')
            ]
          })
        ]
      },
      bundle: {
        sourceMap: 'inline'
      }
    }
  });
};

Keywords

FAQs

Package last updated on 14 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc