kopia lustrzana https://github.com/c9/core
				
				
				
			fix handling of plugins config from package.json
							rodzic
							
								
									bf5aede66e
								
							
						
					
					
						commit
						21cc0a2047
					
				|  | @ -555,7 +555,12 @@ define(function(require, exports, module) { | |||
|                             additional.push({ | ||||
|                                 id: path, | ||||
|                                 source: 'define("' + path + '", [],' +  | ||||
|                                     JSON.stringify(packedConfig, null, 4) + ');', | ||||
|                                     JSON.stringify(packedConfig.map(function(p) { | ||||
|                                         var name = p.slice(p.lastIndexOf("/") + 1) | ||||
|                                         var options = json.plugins[name] || {}; | ||||
|                                         options.packagePath = p; | ||||
|                                         return options; | ||||
|                                     }), null, 4) + ');', | ||||
|                                 literal : true, | ||||
|                                 order: -1 | ||||
|                             }); | ||||
|  |  | |||
|  | @ -103,10 +103,10 @@ define(function(require, exports, module) { | |||
|                 requirejs.undef(root + "/__installed__.js"); | ||||
|                 require([root + "/__installed__"], function(plugins) { | ||||
|                     var config = plugins.map(function(p) { | ||||
|                         return { | ||||
|                             staticPrefix: host + join(base, paths[root]), | ||||
|                             packagePath: p | ||||
|                         }; | ||||
|                         if (typeof p == "string") | ||||
|                             p = { packagePath: p }; | ||||
|                         p.staticPrefix = host + join(base, paths[root]); | ||||
|                         return p; | ||||
|                     }); | ||||
|                      | ||||
|                     architect.loadAdditionalPlugins(config, function(err){ | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 nightwing
						nightwing