Repository: couchdb-fauxton Updated Branches: refs/heads/master 7642cadb1 -> 57883a2b4
remove useless grunt defaults the defaults are not used at all as all setting.json files implement them, but make it harder for everyone to understand what is happening. additionally configuration should not be mixed into the code as it turned out worthwile to don't mix config and code. PR: #598 PR-URL: https://github.com/apache/couchdb-fauxton/pull/598 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/57883a2b Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/57883a2b Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/57883a2b Branch: refs/heads/master Commit: 57883a2b4f97c82288e4c589857879eede4861ff Parents: 7642cad Author: Robert Kowalski <[email protected]> Authored: Thu Jan 7 15:54:37 2016 +0100 Committer: Robert Kowalski <[email protected]> Committed: Mon Jan 11 13:29:12 2016 +0100 ---------------------------------------------------------------------- Gruntfile.js | 28 +++------------------------- settings.json.sample_external | 10 ---------- tasks/couchserver.js | 2 +- 3 files changed, 4 insertions(+), 36 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/57883a2b/Gruntfile.js ---------------------------------------------------------------------- diff --git a/Gruntfile.js b/Gruntfile.js index 4edee3e..cdc6de3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -79,28 +79,7 @@ module.exports = function (grunt) { return theAssets; }(); - var templateSettings = function () { - var defaultSettings = { - "development": { - "src": "assets/index.underscore", - "dest": "dist/debug/index.html", - "variables": { - "requirejs": "/assets/js/libs/require.js", - "css": "./css/index.css", - "base": null - } - }, - "release": { - "src": "assets/index.underscore", - "dest": "dist/debug/index.html", - "variables": { - "requirejs": "./js/{REQUIREJS_FILE}", - "css": "./css/{CSS_FILE}", - "base": null - } - } - }; - + var templateSettings = (function getTemplateSettings () { var settings = initHelper.readSettingsFile(); var i18n = JSON.stringify(initHelper.readI18nFile(), null, ' '); @@ -113,15 +92,14 @@ module.exports = function (grunt) { settings.template[key].app.i18n = i18n; }); - return settings.template || defaultSettings; - }(); + return settings.template; + })(); var couchserver_config = function () { // add a "couchserver" key to settings.json with JSON that matches the // keys and values below (plus your customizations) to have Fauxton work // against a remote CouchDB-compatible server. var defaults = { - dist: './dist/debug/', port: helper.devServerPort, proxy: { target: helper.couch http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/57883a2b/settings.json.sample_external ---------------------------------------------------------------------- diff --git a/settings.json.sample_external b/settings.json.sample_external deleted file mode 100644 index 71c45b4..0000000 --- a/settings.json.sample_external +++ /dev/null @@ -1,10 +0,0 @@ -{ - "deps": [ - { - "name": "fauxton-demo-plugin", - "url": "git://github.com/chewbranca/fauxton-demo-plugin.git" - }, - { "name": "config" }, - { "name": "logs" } - ] -} http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/57883a2b/tasks/couchserver.js ---------------------------------------------------------------------- diff --git a/tasks/couchserver.js b/tasks/couchserver.js index 66f8725..a70cf52 100644 --- a/tasks/couchserver.js +++ b/tasks/couchserver.js @@ -29,7 +29,7 @@ module.exports = function (grunt) { } // Options - var dist_dir = options.dist || './dist/debug/', + var dist_dir = './dist/debug/', app_dir = './app', port = options.port, setContentSecurityPolicy = _.isUndefined(options.contentSecurityPolicy) ? true : options.contentSecurityPolicy;
