lib/graph/recycle.js
function regenerate(moduleName, done){
		var cfg = clone(config, true);
		// if the moduleName is not in the graph, make it the main.
		if(moduleName && !cachedData.graph[moduleName]) {
			cfg.main = moduleName;
		}

		makeBundleGraph(cfg, options).then(function(data){
			var graph = data.graph;
			var oldGraph = cachedData ? cachedData.graph : {};
			for(var name in graph){
				if(name !== moduleName && oldGraph[name]) {
					graph[name].transforms = oldGraph[name].transforms;
				}
			}
			cachedData = cloneData(data);
			done(null, data);
		}, done);
	}
function regenerate(moduleName, done){
		var cfg = clone(config, true);
		// if the moduleName is not in the graph, make it the main.
		if(moduleName && !cachedData.graph[moduleName]) {
			cfg.main = moduleName;
		}

		makeBundleGraph(cfg, options).then(function(data){
			var graph = data.graph;
			var oldGraph = cachedData ? cachedData.graph : {};
			for(var name in graph){
				if(name !== moduleName && oldGraph[name]) {
					graph[name].transforms = oldGraph[name].transforms;
				}
			}
			cachedData = cloneData(data);
			done(null, data);
		}, done);
	}
function regenerate ( moduleName , done ) { var cfg = clone ( config , true ) ; // if the moduleName is not in the graph, make it the main. if ( moduleName && ! cachedData . graph [ moduleName ] ) { cfg . main = moduleName ; } makeBundleGraph ( cfg , options ) . then ( function ( data ) { var graph = data . graph ; var oldGraph = cachedData ? cachedData . graph : { } ; for ( var name in graph ) { if ( name !== moduleName && oldGraph [ name ] ) { graph [ name ] . transforms = oldGraph [ name ] . transforms ; } } cachedData = cloneData ( data ) ; done ( null , data ) ; } , done ) ; }
Regenerate a new bundle graph and copy over the transforms so they can be reused.
Regenerate a new bundle graph and copy over the transforms so they can be reused .