Repository: couchdb-fauxton Updated Branches: refs/heads/master 9e5cf9fe3 -> 16a81431a
cleanup build: use globbing properly remove unneccessary loop over directories to find images PR: #615 PR-URL: https://github.com/apache/couchdb-fauxton/pull/615 Reviewed-By: Benjamin Keen <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/1de7efa1 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/1de7efa1 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/1de7efa1 Branch: refs/heads/master Commit: 1de7efa1b8a30f9dc47d4c8107a5c21a312d8198 Parents: 9e5cf9f Author: Robert Kowalski <[email protected]> Authored: Tue Jan 19 16:16:51 2016 +0100 Committer: Robert Kowalski <[email protected]> Committed: Wed Jan 20 09:38:21 2016 +0100 ---------------------------------------------------------------------- Gruntfile.js | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/1de7efa1/Gruntfile.js ---------------------------------------------------------------------- diff --git a/Gruntfile.js b/Gruntfile.js index 8ecf193..4826c72 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -58,22 +58,6 @@ module.exports = function (grunt) { return _.union(["dist/", "app/load_addons.js"], cleanableAddons); }(); - var assets = function () { - // Base assets - var theAssets = { - img: ["assets/img/**"] - }; - initHelper.processAddons(function (addon) { - // Images - var root = addon.path || "app/addons/" + addon.name; - var imgPath = root + "/assets/img"; - if (fs.existsSync(imgPath)) { - theAssets.img.push(imgPath + "/**"); - } - }); - return theAssets; - }(); - var templateSettings = (function getTemplateSettings () { var settings = initHelper.readSettingsFile(); @@ -219,7 +203,7 @@ module.exports = function (grunt) { dist:{ files:[ {src: 'dist/debug/index.html', dest: 'dist/release/index.html'}, - {src: assets.img, dest: 'dist/release/dashboard.assets/img/', flatten: true, expand: true}, + {src: ['assets/img/**', 'app/addons/**/assets/img/**'], dest: 'dist/release/dashboard.assets/img/', flatten: true, expand: true}, {src: ['assets/js/**/*.swf'], dest: 'dist/release/dashboard.assets/', flatten: true, expand: true, filter: 'isFile'}, {src: ['*.eot', '*.woff', '*.svg', '*.ttf'], cwd: './assets/fonts', dest: 'dist/release/dashboard.assets/fonts/', filter: 'isFile', flatten: true, expand: true}, {src: './favicon.ico', dest: "dist/release/favicon.ico"} @@ -230,7 +214,7 @@ module.exports = function (grunt) { files:[ {src: ['assets/js/**/*.swf'], dest: 'dist/debug/dashboard.assets/', flatten: true, expand: true, filter: 'isFile'}, {src: ['*.eot', '*.woff', '*.svg', '*.ttf'], cwd: './assets/fonts', dest: 'dist/debug/dashboard.assets/fonts/', filter: 'isFile', flatten: true, expand: true}, - {src: assets.img, dest: 'dist/debug/dashboard.assets/img/', flatten: true, expand: true}, + {src: ['assets/img/**', 'app/addons/**/assets/img/**'], dest: 'dist/debug/dashboard.assets/img/', flatten: true, expand: true}, {src: './favicon.ico', dest: "dist/debug/favicon.ico"} ] },
