grunt-webpack
Advanced tools
Comparing version 0.10.4 to 0.10.5
{ | ||
"name": "grunt-webpack", | ||
"description": "Use webpack with grunt.", | ||
"version": "0.10.4", | ||
"version": "0.10.5", | ||
"homepage": "https://github.com/webpack/grunt-webpack", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -26,3 +26,20 @@ /* | ||
var obj = grunt.config(ns); | ||
if(obj.plugins) obj.plugins = grunt.config.getRaw(ns.concat(["plugins"])); | ||
if(obj.plugins) { | ||
// getRaw must be used or grunt.config will clobber the types (i.e. | ||
// the array won't a BannerPlugin, it will contain an Object) | ||
obj.plugins = grunt.config.getRaw(ns.concat(["plugins"])); | ||
// See https://github.com/webpack/grunt-webpack/pull/9 | ||
obj.plugins = obj.plugins.map(function(plugin) { | ||
var instance = Object.create(plugin); // Operate on a copy of the plugin, since the webpack task | ||
// can be called multiple times for one instance of a plugin | ||
for(var key in plugin) { | ||
// Re-interpolate plugin string properties as templates | ||
if(Object.prototype.hasOwnProperty.call(plugin, key) && typeof plugin[key] === "string") { | ||
instance[key] = grunt.template.process(plugin[key]); | ||
} | ||
} | ||
return instance; | ||
}); | ||
} | ||
return obj; | ||
@@ -29,0 +46,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7080
121