diff --git a/libraries/settings/Settings.coffee b/libraries/settings/Settings.coffee index 81fc8977f5..9517e02bcc 100755 --- a/libraries/settings/Settings.coffee +++ b/libraries/settings/Settings.coffee @@ -10,9 +10,9 @@ merge = (settings, defaults) -> defaults[key] = value return defaults -defaultSettingsPath = path.normalize(__dirname + "/../../config/settings.defaults.coffee") +defaultSettingsPath = path.normalize(__dirname + "/../../config/settings.defaults") -if fs.existsSync(defaultSettingsPath) +if fs.existsSync("#{defaultSettingsPath}.coffee") or fs.existsSync("#{defaultSettingsPath}.js") defaults = require(defaultSettingsPath) settingsExist = true else @@ -23,6 +23,8 @@ if process.env.SHARELATEX_CONFIG? possibleConfigFiles = [process.env.SHARELATEX_CONFIG] else possibleConfigFiles = [ + process.cwd() + "/config/settings.#{env}.js" + path.normalize(__dirname + "/../../config/settings.#{env}.js") process.cwd() + "/config/settings.#{env}.coffee" path.normalize(__dirname + "/../../config/settings.#{env}.coffee") ] @@ -37,4 +39,3 @@ if !settingsExist console.warn "No settings or defaults found. I'm flying blind." module.exports = defaults - diff --git a/libraries/settings/package.json b/libraries/settings/package.json index 42c0b46c30..978a782b03 100644 --- a/libraries/settings/package.json +++ b/libraries/settings/package.json @@ -2,7 +2,7 @@ "name": "settings-sharelatex", "homepage": "www.sharelatex.com", "description": "A centralised settings system for ShareLaTeX", - "version": "1.0.0", + "version": "1.1.0", "repository": { "type": "git", "url": "https://github.com/sharelatex/settings-sharelatex.git"