Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
167f5484
Commit
167f5484
authored
Jul 17, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use extend module to merge configurations - closes #2
parent
a3b29d9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
14 deletions
+5
-14
debomatic-webui/lib/config.coffee
debomatic-webui/lib/config.coffee
+3
-13
debomatic-webui/package.json
debomatic-webui/package.json
+2
-1
No files found.
debomatic-webui/lib/config.coffee
View file @
167f5484
#
# * Please DO NOT edit this file.
# *
...
...
@@ -6,6 +5,8 @@
# *
#
extend
=
require
(
'extend'
)
# #start config-auto-export
config
=
{}
...
...
@@ -101,18 +102,7 @@ try
if
user_config
console
.
log
"Reading user configutation ..."
# * update object1 with object2 values
_merge
=
(
object1
,
object2
)
->
result
=
{}
for
p
of
object1
if
object2
.
hasOwnProperty
(
p
)
if
typeof
object1
[
p
]
is
"object"
and
typeof
object2
[
p
]
is
"object"
result
[
p
]
=
_merge
(
object1
[
p
],
object2
[
p
])
else
result
[
p
]
=
object2
[
p
]
else
result
[
p
]
=
object1
[
p
]
return
result
config
=
_merge
(
config
,
require
(
user_config
))
config
=
extend
(
true
,
{},
config
,
require
(
user_config
))
else
console
.
log
"No user config specified. Using global settings."
catch
err
...
...
debomatic-webui/package.json
View file @
167f5484
...
...
@@ -9,7 +9,8 @@
"errorhandler "
:
"*"
,
"ejs"
:
">= 0.0.1"
,
"socket.io"
:
"1.*"
,
"tail"
:
"*"
"tail"
:
"*"
,
"extend"
:
"~1.3.0"
},
"scripts"
:
{
"install"
:
"bash scripts/install.sh"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment