mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-02 17:15:24 +02:00
Replace some '_.each' with 'Array.prototype.forEach'
This commit is contained in:
parent
489a4b9095
commit
0134bf9870
4 changed files with 50 additions and 56 deletions
|
@ -62,7 +62,7 @@ module.exports = function(grunt) {
|
|||
hashedMinFile = 'bundle.js';
|
||||
}
|
||||
var jsRegex = /bundle\.min\.\w+\.js/;
|
||||
_.each(buildFiles, function(jsFile) {
|
||||
buildFiles.forEach(function(jsFile) {
|
||||
if (jsRegex.test(jsFile)) {
|
||||
if (hashedMinFile) {
|
||||
throw new Error('more than one hashed file: ' + jsFile + hashedMinFile);
|
||||
|
@ -76,7 +76,7 @@ module.exports = function(grunt) {
|
|||
|
||||
var styleRegex = /main\.\w+\.css/;
|
||||
var hashedStyleFile;
|
||||
_.each(buildFiles, function(styleFile) {
|
||||
buildFiles.forEach(function(styleFile) {
|
||||
if (styleRegex.test(styleFile)) {
|
||||
if (hashedStyleFile) {
|
||||
throw new Error('more than one hashed style: ' + styleFile + hashedStyleFile);
|
||||
|
@ -253,4 +253,3 @@ module.exports = function(grunt) {
|
|||
grunt.registerTask('test', ['jasmine_node']);
|
||||
grunt.registerTask('casperTest', ['shell:casperTest']);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue