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

karma-rollup-preprocessor

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-rollup-preprocessor

Karma preprocessor to bundle ES6 modules using Rollup

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
58K
increased by10.44%
Maintainers
2
Weekly downloads
 
Created
Source

Karma preprocessor to bundle ES6 modules using Rollup.

Build Status Dependency Status Downloads Version License


Features

  • Rebundles your files when watched dependencies change
  • Caches bundle output for improved performance
  • Maintained with heart by @jlmakes

Installation

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

Configuration

All the options detailed in the Rollup Documentation can be passed to rollupPreprocessor.

Example

Below is a well-founded recommendation using the Bublé ES2015 transpiler:

// karma.conf.js
module.exports = function (config) {
	config.set({

		files: [
			'src/**/*.js',
			'test/**/*.spec.js',
		],

		preprocessors: {
			'src/**/*.js': ['rollup'],
			'test/**/*.spec.js': ['rollup'],
		},

		rollupPreprocessor: {
			plugins: [
				require('rollup-plugin-buble')(),
			],
			format: 'iife',              // helps prevent naming collisions
			moduleName: '<your_project>' // required for 'iife' format
			sourceMap: 'inline',         // sensible for testing
		},
	});
};

Support

Supports all Rollup plug-ins, and works on Node 0.12.x and up. Happy bundling!

Keywords

FAQs

Package last updated on 02 Dec 2016

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