| 
														
															@@ -267,12 +267,11 @@ function resolve_js(filename) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 // both locally and in $AMBER/js and $AMBER/st  
														 | 
														
														 | 
														
															 // both locally and in $AMBER/js and $AMBER/st  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 // -------------------------------------------------- 
														 | 
														
														 | 
														
															 // -------------------------------------------------- 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 function collect_files(filesArray) { 
														 | 
														
														 | 
														
															 function collect_files(filesArray) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	var currentFile = filesArray.shift(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	while (undefined !== currentFile) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		var suffix = path.extname(currentFile); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	filesArray.forEach(function(currentFile) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		var fileSuffix = path.extname(currentFile); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		var category = path.basename(currentFile, '.st'); 
														 | 
														
														 | 
														
															 		var category = path.basename(currentFile, '.st'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		var amberFile = path.join(defaults.amber_dir, 'st', currentFile); 
														 | 
														
														 | 
														
															 		var amberFile = path.join(defaults.amber_dir, 'st', currentFile); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		switch (suffix) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		switch (fileSuffix) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			case '.st': 
														 | 
														
														 | 
														
															 			case '.st': 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				if (path.existsSync(currentFile)) { 
														 | 
														
														 | 
														
															 				if (path.existsSync(currentFile)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					defaults.compile.push(currentFile); 
														 | 
														
														 | 
														
															 					defaults.compile.push(currentFile); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -294,8 +293,7 @@ function collect_files(filesArray) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				defaults.program = currentFile 
														 | 
														
														 | 
														
															 				defaults.program = currentFile 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				break; 
														 | 
														
														 | 
														
															 				break; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		}; 
														 | 
														
														 | 
														
															 		}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		currentFile = filesArray.shift(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	}; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	}); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	resolve_libraries(); 
														 | 
														
														 | 
														
															 	resolve_libraries(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |