| 
									
										
										
										
											2015-05-17 00:27:59 +08:00
										 |  |  | /* | 
					
						
							|  |  |  | 	MIT License http://www.opensource.org/licenses/mit-license.php
 | 
					
						
							|  |  |  | 	Author Tobias Koppers @sokra | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											2018-07-30 23:08:51 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-29 15:40:31 +08:00
										 |  |  | "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-15 16:28:45 +08:00
										 |  |  | const DllModule = require("./DllModule"); | 
					
						
							| 
									
										
										
										
											2015-05-17 00:27:59 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-06-26 14:27:44 +08:00
										 |  |  | class DllModuleFactory { | 
					
						
							| 
									
										
										
										
											2016-12-29 15:40:31 +08:00
										 |  |  | 	constructor() { | 
					
						
							| 
									
										
										
										
											2017-11-28 16:54:24 +08:00
										 |  |  | 		this.hooks = {}; | 
					
						
							| 
									
										
										
										
											2016-12-29 15:40:31 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | 	create(data, callback) { | 
					
						
							| 
									
										
										
										
											2017-02-05 07:18:30 +08:00
										 |  |  | 		const dependency = data.dependencies[0]; | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 		callback( | 
					
						
							|  |  |  | 			null, | 
					
						
							|  |  |  | 			new DllModule( | 
					
						
							|  |  |  | 				data.context, | 
					
						
							|  |  |  | 				dependency.dependencies, | 
					
						
							|  |  |  | 				dependency.name, | 
					
						
							|  |  |  | 				dependency.type | 
					
						
							|  |  |  | 			) | 
					
						
							|  |  |  | 		); | 
					
						
							| 
									
										
										
										
											2016-12-29 15:40:31 +08:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-05-17 00:27:59 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-29 15:40:31 +08:00
										 |  |  | module.exports = DllModuleFactory; |