mirror of https://github.com/webpack/webpack.git
				
				
				
			Merge branch 'kinka-webpack'
This commit is contained in:
		
						commit
						6cf2d3f2a5
					
				| 
						 | 
				
			
			@ -193,6 +193,19 @@ module.exports = function(optimist, argv, convertOptions) {
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		function loadPlugin(name) {
 | 
			
		||||
			var loadUtils = require("loader-utils");
 | 
			
		||||
			var args = null;
 | 
			
		||||
			try {
 | 
			
		||||
				var p = name && name.indexOf("?");
 | 
			
		||||
				if (p > -1) {
 | 
			
		||||
					args = loadUtils.parseQuery(name.substring(p));
 | 
			
		||||
					name = name.substring(0, p);
 | 
			
		||||
				}
 | 
			
		||||
			} catch(e) {
 | 
			
		||||
				console.log("Invalid plugin arguments" + e + ".");
 | 
			
		||||
				process.exit(-1);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			var path;
 | 
			
		||||
			try {
 | 
			
		||||
				path = resolve.sync(process.cwd(), name);
 | 
			
		||||
| 
						 | 
				
			
			@ -208,7 +221,7 @@ module.exports = function(optimist, argv, convertOptions) {
 | 
			
		|||
				throw e;
 | 
			
		||||
			}
 | 
			
		||||
			try {
 | 
			
		||||
				return new Plugin();
 | 
			
		||||
				return new Plugin(args);
 | 
			
		||||
			} catch(e) {
 | 
			
		||||
				console.log("Cannot instantiate plugin " + name + ". (" + path + ")");
 | 
			
		||||
				throw e;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,6 +41,7 @@
 | 
			
		|||
    "js-beautify": "^1.5.10",
 | 
			
		||||
    "json-loader": "~0.5.1",
 | 
			
		||||
    "less-loader": "^2.0.0",
 | 
			
		||||
    "loader-utils": "^0.2.11",
 | 
			
		||||
    "mocha": "~2.2.0",
 | 
			
		||||
    "mocha-lcov-reporter": "0.0.2",
 | 
			
		||||
    "raw-loader": "~0.5.0",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue