grunt-usemin
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -17,6 +17,25 @@ 'use strict'; | ||
var Flow = module.exports = function (flowConfig) { | ||
this._steps = flowConfig.steps || {}; | ||
this._post = flowConfig.post || {}; | ||
this.setSteps(flowConfig.steps); | ||
this.setPost(flowConfig.post); | ||
}; | ||
Flow.formatStepName = function (step) { | ||
if (typeof step === 'string') { | ||
return /uglify/.test(step) ? 'uglify' : step; | ||
} | ||
step.name = /uglify/.test(step.name) ? 'uglify' : step.name; | ||
return step; | ||
}; | ||
Flow.formatSteps = function (steps) { | ||
var formattedSteps = {}; | ||
_.forIn(steps, function (config, type) { | ||
formattedSteps[type] = config.map(Flow.formatStepName); | ||
}); | ||
return formattedSteps; | ||
}; | ||
// | ||
@@ -33,4 +52,3 @@ // Returns the steps for the furnished block type | ||
Flow.prototype.setSteps = function (steps) { | ||
// FIXME: Check format !!! | ||
this._steps = steps; | ||
this._steps = Flow.formatSteps(steps) || {}; | ||
}; | ||
@@ -49,4 +67,3 @@ | ||
Flow.prototype.setPost = function (post) { | ||
// FIXME: Check format !!! | ||
this._post = post; | ||
this._post = Flow.formatSteps(post) || {}; | ||
}; | ||
@@ -53,0 +70,0 @@ |
{ | ||
"name": "grunt-usemin", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"license": "BSD-2-Clause", | ||
@@ -5,0 +5,0 @@ "author": "Yeoman", |
@@ -6,2 +6,8 @@ # grunt-usemin [](https://travis-ci.org/yeoman/grunt-usemin) [](https://ci.appveyor.com/project/addyosmani/grunt-usemin/branch/master) | ||
## Important | ||
3.1.0 has a breaking change with `uglify` step renamed to `uglify` to be consistent with `grunt-contrib-uglify` task which name is `uglify` (and not `uglifyjs`). | ||
Stick to 3.0.0 while we find a good solution to not have a breaking change while having name consistency. | ||
## [Maintainer wanted](https://github.com/yeoman/grunt-usemin/issues/313) | ||
@@ -8,0 +14,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
62889
1140
637
1