karma-rollup-preprocessor
Advanced tools
Comparing version 7.0.7 to 7.0.8
# Change Log | ||
## [7.0.8] - 2022-02-06 | ||
### Fixed | ||
- Watcher not working using TypeScript [@YonatanKra](https://github.com/YonatanKra) [#72](https://github.com/jlmakes/karma-rollup-preprocessor/issues/72] | ||
## [7.0.7] - 2021-03-14 | ||
@@ -255,2 +261,3 @@ | ||
[7.0.8]: https://github.com/jlmakes/karma-rollup-preprocessor/compare/7.0.7...7.0.8 | ||
[7.0.7]: https://github.com/jlmakes/karma-rollup-preprocessor/compare/7.0.6...7.0.7 | ||
@@ -257,0 +264,0 @@ [7.0.6]: https://github.com/jlmakes/karma-rollup-preprocessor/compare/7.0.5...7.0.6 |
@@ -70,8 +70,16 @@ 'use strict' | ||
let bundle = await rollup.rollup(options) | ||
cache.set(originalPath, bundle.cache) | ||
let bundle; | ||
options.cache = false; | ||
if (watcher) { | ||
const watch = await rollup.watch(options); | ||
bundle = await new Promise(res => watch.on('event', ( { result, code }) => { | ||
if (code === 'BUNDLE_END') return res(result); | ||
})); | ||
let [entry, ...dependencies] = bundle.watchFiles | ||
watcher.add(entry, dependencies) | ||
} else { | ||
bundle = await rollup.rollup(options) | ||
cache.set(originalPath, bundle.cache) | ||
} | ||
@@ -78,0 +86,0 @@ |
{ | ||
"name": "karma-rollup-preprocessor", | ||
"version": "7.0.7", | ||
"version": "7.0.8", | ||
"description": "Karma preprocessor to bundle ES modules using Rollup", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -1,28 +0,17 @@ | ||
<p align="center"> | ||
<img src="https://jlmakes.com/logos/png/karma-rollup-preprocessor.png?v=1" width="200px" > | ||
</p> | ||
# `karma-rollup-preprocessor` | ||
<br> | ||
Karma preprocessor to bundle ES modules using Rollup. | ||
<p align="center"> | ||
<img src="https://jlmakes.com/logos/svg/karma-rollup-logotype.svg" width="200px" alt="Karma + Rollup"> | ||
</p> | ||
<p align="center">Karma preprocessor to bundle ES modules using <a href="http://rollupjs.org/">Rollup</a>.</p> | ||
<p align="center"> | ||
<p> | ||
<a href="https://travis-ci.org/jlmakes/karma-rollup-preprocessor"> | ||
<img src="https://img.shields.io/travis/jlmakes/karma-rollup-preprocessor.svg" alt="Build Status"> | ||
<img src="https://img.shields.io/travis/jlmakes/karma-rollup-preprocessor?color=black&style=for-the-badge" alt="Build Status"> | ||
</a> | ||
<a href="https://david-dm.org/jlmakes/karma-rollup-preprocessor"> | ||
<img src="https://img.shields.io/david/jlmakes/karma-rollup-preprocessor.svg" alt="Dependency Status"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/karma-rollup-preprocessor"> | ||
<img src="https://img.shields.io/npm/dm/karma-rollup-preprocessor.svg" alt="Downloads"> | ||
<img src="https://img.shields.io/npm/dm/karma-rollup-preprocessor?color=black&style=for-the-badge" alt="Downloads"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/karma-rollup-preprocessor"> | ||
<img src="https://img.shields.io/npm/v/karma-rollup-preprocessor.svg" alt="Version"> | ||
<img src="https://img.shields.io/npm/v/karma-rollup-preprocessor?color=black&style=for-the-badge" alt="Version"> | ||
</a> | ||
<a href="https://opensource.org/licenses/MIT"> | ||
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"> | ||
<img src="https://img.shields.io/badge/license-MIT-blue?color=black&style=for-the-badge" alt="MIT License"> | ||
</a> | ||
@@ -33,10 +22,2 @@ </p> | ||
## Features | ||
- Rebundles your files when watched dependencies change | ||
- Caches bundle output for improved performance | ||
- Maintained with ![heart](http://i.imgur.com/oXJmdtz.gif) by [@jlmakes](https://twitter.com/jlmakes) | ||
<br> | ||
## Installation | ||
@@ -60,3 +41,3 @@ | ||
// karma.conf.js | ||
module.exports = function(config) { | ||
module.exports = function (config) { | ||
config.set({ | ||
@@ -99,3 +80,3 @@ files: [ | ||
// karma.conf.js | ||
module.exports = function(config) { | ||
module.exports = function (config) { | ||
config.set({ | ||
@@ -135,2 +116,2 @@ files: [{ pattern: 'test/**/*.spec.js', watched: false }], | ||
Happy bundling! | ||
Happy bundling! ![heart](http://i.imgur.com/oXJmdtz.gif) |
255
23709
114