rollup-watch
Advanced tools
Comparing version 2.4.0 to 2.5.0
# rollup-watch changelog | ||
## 2.5.0 | ||
* Use `cache` ([#8](https://github.com/rollup/rollup-watch/issues/8)) | ||
## 2.4.0 | ||
@@ -4,0 +8,0 @@ |
@@ -27,4 +27,17 @@ 'use strict'; | ||
function assign ( target ) { | ||
var sources = [], len = arguments.length - 1; | ||
while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; | ||
sources.forEach( function (source) { | ||
for ( var key in source ) { | ||
if ( source.hasOwnProperty( key ) ) target[ key ] = source[ key ]; | ||
} | ||
}); | ||
return target; | ||
} | ||
var name = "rollup-watch"; | ||
var version = "2.4.0"; | ||
var version = "2.5.0"; | ||
@@ -98,2 +111,3 @@ function checkVersion ( name, localVersion ) { | ||
var timeout; | ||
var cache; | ||
@@ -117,2 +131,3 @@ function triggerRebuild () { | ||
var initial = !watching; | ||
var opts = assign( {}, options, cache ? { cache: cache } : {}); | ||
@@ -123,4 +138,7 @@ emitter.emit( 'event', { code: 'BUILD_START' }); | ||
return rollup.rollup( options ) | ||
return rollup.rollup( opts ) | ||
.then( function (bundle) { | ||
// Save off bundle for re-use later | ||
cache = bundle; | ||
bundle.modules.forEach( function (module) { | ||
@@ -127,0 +145,0 @@ var id = module.id; |
@@ -23,4 +23,17 @@ import EventEmitter from 'events'; | ||
function assign ( target ) { | ||
var sources = [], len = arguments.length - 1; | ||
while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; | ||
sources.forEach( function (source) { | ||
for ( var key in source ) { | ||
if ( source.hasOwnProperty( key ) ) target[ key ] = source[ key ]; | ||
} | ||
}); | ||
return target; | ||
} | ||
var name = "rollup-watch"; | ||
var version = "2.4.0"; | ||
var version = "2.5.0"; | ||
@@ -94,2 +107,3 @@ function checkVersion ( name, localVersion ) { | ||
var timeout; | ||
var cache; | ||
@@ -113,2 +127,3 @@ function triggerRebuild () { | ||
var initial = !watching; | ||
var opts = assign( {}, options, cache ? { cache: cache } : {}); | ||
@@ -119,4 +134,7 @@ emitter.emit( 'event', { code: 'BUILD_START' }); | ||
return rollup.rollup( options ) | ||
return rollup.rollup( opts ) | ||
.then( function (bundle) { | ||
// Save off bundle for re-use later | ||
cache = bundle; | ||
bundle.modules.forEach( function (module) { | ||
@@ -123,0 +141,0 @@ var id = module.id; |
{ | ||
"name": "rollup-watch", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Watch files for changes and perform incremental rebuilds with Rollup", | ||
@@ -5,0 +5,0 @@ "main": "dist/rollup-watch.cjs.js", |
import EventEmitter from 'events'; | ||
import * as fs from 'fs'; | ||
import { sequence } from './utils/promise.js'; | ||
import { assign } from './utils/object.js'; | ||
import { name, version } from '../package.json'; | ||
@@ -60,2 +61,3 @@ import checkVersion from './utils/checkVersion.js'; | ||
let timeout; | ||
let cache; | ||
@@ -79,2 +81,3 @@ function triggerRebuild () { | ||
let initial = !watching; | ||
let opts = assign( {}, options, cache ? { cache } : {}); | ||
@@ -85,4 +88,7 @@ emitter.emit( 'event', { code: 'BUILD_START' }); | ||
return rollup.rollup( options ) | ||
return rollup.rollup( opts ) | ||
.then( bundle => { | ||
// Save off bundle for re-use later | ||
cache = bundle; | ||
bundle.modules.forEach( module => { | ||
@@ -89,0 +95,0 @@ const id = module.id; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15316
8
450