mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 11:21:12 +00:00
Allow .js setting files
This commit is contained in:
parent
5f50672342
commit
98eb92a0a9
2 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "settings-sharelatex",
|
||||
"homepage": "www.sharelatex.com",
|
||||
"description": "A centralised settings system for ShareLaTeX",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sharelatex/settings-sharelatex.git"
|
||||
|
|
Loading…
Reference in a new issue