mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Initial open source commit
This commit is contained in:
commit
3133f85164
3 changed files with 26 additions and 0 deletions
16
libraries/settings/Settings.coffee
Executable file
16
libraries/settings/Settings.coffee
Executable file
|
@ -0,0 +1,16 @@
|
|||
fs = require "fs"
|
||||
path = require "path"
|
||||
env = (process.env.NODE_ENV or "development").toLowerCase()
|
||||
|
||||
possibleConfigFiles = [
|
||||
process.cwd() + "/config/settings.#{env}.coffee"
|
||||
path.normalize(__dirname + "/../../config/settings.#{env}.coffee")
|
||||
]
|
||||
|
||||
for file in possibleConfigFiles
|
||||
if fs.existsSync(file)
|
||||
module.exports = require(file)
|
||||
return
|
||||
|
||||
console.log "No config file could be found at: ", possibleConfigFiles
|
||||
throw new Error("No config file found")
|
2
libraries/settings/index.js
Executable file
2
libraries/settings/index.js
Executable file
|
@ -0,0 +1,2 @@
|
|||
require("coffee-script")
|
||||
module.exports = require('./Settings');
|
8
libraries/settings/package.json
Normal file
8
libraries/settings/package.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "settings-sharelatex",
|
||||
"homepage": "www.sharelatex.com",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"coffee-script":"1.6.0"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue