1.0.1 • Published 3 years ago

karma-rollup2-preprocessor v1.0.1

Weekly downloads
5
License
MIT
Repository
-
Last release
3 years ago

karma-rollup2-preprocessor

Yet another rollup-based preprocessor for karma.

Usage

Install the package:

npm install --save-dev karma-rollup2-preprocessor

...and adjust your karma.conf accordingly.

// karma.conf.js
module.exports = function (config) {
	config.set({
		files: [
			/**
			 * Make sure to disable Karma’s file watcher
			 * because the preprocessor will use its own.
			 */
			{ pattern: "test/**/*.spec.js", watched: false },
		],

		preprocessors: {
			"test/**/*.spec.js": ["rollup2"],
		},

		rollupPreprocessor: {
			// Your rollup configuration goes here. Both "input" and "output"
			// will be set by this preprocessor
		},
	});
};

License

MIT, see the license file.