Skip to content

Commit 1df1d39

Browse files
author
Maxime LUCE
committed
Merge branch 'schoes-master'
2 parents 2df7a1c + e6b68f1 commit 1df1d39

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "grunt-html-build",
33
"description": "Grunt HTML Builder - Appends scripts and styles, Removes debug parts, append html partials, Template options",
4-
"version": "0.5.1",
4+
"version": "0.5.2",
55
"homepage": "https://github.com/spatools/grunt-html-build.git",
66
"author": {
77
"name": "SPA Tools",
@@ -18,7 +18,8 @@
1818
"grunt": "^0.4.5"
1919
},
2020
"dependencies": {
21-
"js-beautify": "^1.5.5"
21+
"js-beautify": "^1.5.5",
22+
"lodash":"^3.10.0"
2223
},
2324
"keywords": [
2425
"gruntplugin",

tasks/build-html.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = function (grunt) {
2828
//#region Global Properties
2929

3030
var // Init
31-
_ = grunt.util._,
31+
_ = require('lodash'),
3232
EOL = grunt.util.linefeed,
3333
URL = require('url'),
3434
path = require('path'),
@@ -90,7 +90,8 @@ module.exports = function (grunt) {
9090
}
9191
function defaultProcessPath(pathes, params, opt) { //takes an array of paths and validates them
9292
var local = grunt.file.expand(opt, pathes),
93-
remote = _.map(pathes, path.normalize).filter(function (path) { //for loading from cdn
93+
flattenPaths = _.isArray(pathes) ? _.flattenDeep(pathes) : pathes,
94+
remote = _.map(flattenPaths, path.normalize).filter(function (path) { //for loading from cdn
9495
return /^((http|https):)?(\\|\/\/)/.test(path); //is http, https, or //
9596
});
9697

0 commit comments

Comments
 (0)