mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Use example config file so that config changes do not interfere with git
This commit is contained in:
parent
89bff17891
commit
bf528709d2
2 changed files with 15 additions and 2 deletions
|
@ -77,9 +77,13 @@ module.exports = (grunt) ->
|
||||||
Helpers.updateService(service.name, done)
|
Helpers.updateService(service.name, done)
|
||||||
grunt.registerTask "run:#{service.name}", "Run the ShareLaTeX #{service.name} service", ["bunyan", "execute:#{service.name}"]
|
grunt.registerTask "run:#{service.name}", "Run the ShareLaTeX #{service.name} service", ["bunyan", "execute:#{service.name}"]
|
||||||
|
|
||||||
grunt.registerTask 'install:all', "Download and set up all ShareLaTeX services", ("install:#{service.name}" for service in SERVICES)
|
grunt.registerTask 'install:config', "Copy the example config into the real config", () ->
|
||||||
|
Helpers.installConfig @async()
|
||||||
|
grunt.registerTask 'install:all', "Download and set up all ShareLaTeX services",
|
||||||
|
("install:#{service.name}" for service in SERVICES).concat(["install:config"])
|
||||||
grunt.registerTask 'install', 'install:all'
|
grunt.registerTask 'install', 'install:all'
|
||||||
grunt.registerTask 'update:all', "Checkout and update all ShareLaTeX services", ("update:#{service.name}" for service in SERVICES)
|
grunt.registerTask 'update:all', "Checkout and update all ShareLaTeX services",
|
||||||
|
("update:#{service.name}" for service in SERVICES)
|
||||||
grunt.registerTask 'update', 'update:all'
|
grunt.registerTask 'update', 'update:all'
|
||||||
grunt.registerTask 'run', "Run all of the sharelatex processes", ['concurrent:all']
|
grunt.registerTask 'run', "Run all of the sharelatex processes", ['concurrent:all']
|
||||||
grunt.registerTask 'run:all', 'run'
|
grunt.registerTask 'run:all', 'run'
|
||||||
|
@ -135,6 +139,15 @@ module.exports = (grunt) ->
|
||||||
proc.on "close", () ->
|
proc.on "close", () ->
|
||||||
callback()
|
callback()
|
||||||
|
|
||||||
|
installConfig: (callback = (error) ->) ->
|
||||||
|
if !fs.existsSync("config/settings.development.coffee")
|
||||||
|
grunt.log.writeln "Copying example config into config/settings.development.coffee"
|
||||||
|
exec "cp config/settings.development.coffee.example config/settings.development.coffee", (error, stdout, stderr) ->
|
||||||
|
callback(error)
|
||||||
|
else
|
||||||
|
grunt.log.writeln "Config file already exists. Skipping."
|
||||||
|
callback()
|
||||||
|
|
||||||
runGruntInstall: (dir, callback = (error) ->) ->
|
runGruntInstall: (dir, callback = (error) ->) ->
|
||||||
proc = spawn "grunt", ["install"], stdio: "inherit", cwd: dir
|
proc = spawn "grunt", ["install"], stdio: "inherit", cwd: dir
|
||||||
proc.on "close", () ->
|
proc.on "close", () ->
|
||||||
|
|
Loading…
Reference in a new issue