GithubHelp home page GithubHelp logo

isabella232 / karma-rollup-preprocessor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fezvrasta/karma-rollup-preprocessor

0.0 0.0 0.0 42 KB

Karma preprocessor to bundle ES2015 modules using Rollup.

License: MIT License

JavaScript 100.00%

karma-rollup-preprocessor's Introduction

Karma preprocessor to bundle ES2015 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: [
			// watch src files for changes but
			// don't load them into the browser.
			{ pattern: 'src/**/*.js', included: false },
			'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!

karma-rollup-preprocessor's People

Contributors

jlmakes avatar klaascuvelier avatar brianmhunt avatar vdclouis avatar maartenmortier avatar matgis avatar crowdhailer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.