Initial open source commit

This commit is contained in:
James Allen 2014-02-17 14:51:21 +00:00
commit 3133f85164
3 changed files with 26 additions and 0 deletions

View 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
View file

@ -0,0 +1,2 @@
require("coffee-script")
module.exports = require('./Settings');

View file

@ -0,0 +1,8 @@
{
"name": "settings-sharelatex",
"homepage": "www.sharelatex.com",
"version": "0.0.1",
"dependencies": {
"coffee-script":"1.6.0"
}
}