-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathvariables.js
More file actions
62 lines (57 loc) · 1.26 KB
/
variables.js
File metadata and controls
62 lines (57 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
"use strict";
var properties = require ("../../lib");
var options = {
path: true,
variables: true,
sections: true
};
properties.parse ("variables", options, function (error, p){
if (error) return console.error (error);
console.log (p);
/*
{
domain1: "app1",
domain2: "app2",
users: {
guest: "guest",
admin: "gagle"
},
locales: {
"en-US": "english",
"es-ES": "spanish"
},
paths: {
guest: "paths.guest",
admin: "paths.gagle"
},
"paths.guest": {
home: "some/path",
logs: "some/path/logs/app1",
conf: "some/path/conf/app1",
locales_english: "some/path/locales/app2"
},
"paths.gagle": {
home: "some/path",
logs: "some/path/logs/app1",
conf: "some/path/conf/app1",
locales_spanish: "some/path/locales/app2"
},
permissions: {
guest: "permissions.guest",
admin: "permissions.gagle"
},
"permissions.guest": {
"some/path": 400,
"some/path/logs/app1": 400,
"some/path/conf/app1": 400,
"some/path/locales/app2": 400
},
"permissions.gagle": {
"some/path": 755,
"some/path/logs/app1": 777,
"some/path/conf/app1": 400,
"some/path/locales/app2": 700
}
}
*/
});