|  | @@ -556,9 +556,14 @@ AmberC.prototype.category_export = function() {
 | 
	
		
			
				|  |  |  		console.log('Exporting ' + (defaults.deploy ? '(debug + deploy)' : '(debug)')
 | 
	
		
			
				|  |  |  			+ ' category ' + category + ' as ' + jsFile
 | 
	
		
			
				|  |  |  			+ (defaults.deploy ? ' and ' + jsFileDeploy : ''));
 | 
	
		
			
				|  |  | -		fs.writeFile(jsFile, defaults.smalltalk.Exporter._new()._exportPackage_(category), function(err) {
 | 
	
		
			
				|  |  | +		var smalltalk = defaults.smalltalk;
 | 
	
		
			
				|  |  | +		var pluggableExporter = smalltalk.PluggableExporter;
 | 
	
		
			
				|  |  | +		var packageObject = smalltalk.Package._named_(category);
 | 
	
		
			
				|  |  | +		fs.writeFile(jsFile, smalltalk.String._streamContents_(function (stream) {
 | 
	
		
			
				|  |  | +			pluggableExporter._newUsing_(smalltalk.Exporter._recipe())._exportPackage_on_(packageObject, stream); }), function(err) {
 | 
	
		
			
				|  |  |  			if (defaults.deploy) {
 | 
	
		
			
				|  |  | -				fs.writeFile(jsFileDeploy, defaults.smalltalk.StrippedExporter._new()._exportPackage_(category), callback);
 | 
	
		
			
				|  |  | +				fs.writeFile(jsFileDeploy, smalltalk.String._streamContents_(function (stream) {
 | 
	
		
			
				|  |  | +					pluggableExporter._newUsing_(smalltalk.StrippedExporter._recipe())._exportPackage_on_(packageObject, stream); }), callback);
 | 
	
		
			
				|  |  |  			} else {
 | 
	
		
			
				|  |  |  				callback(null, null);
 | 
	
		
			
				|  |  |  			}
 |