-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.js
187 lines (152 loc) · 3.96 KB
/
config.js
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
'use strict';
let customFile = 'custom.js';
let customModuleFile = 'custom.module.js';
let customCssFile = 'custom1.css';
let mainFile = 'main.js';
let browserify;
let view;
let ve;
let useScss;
let reinstallNodeModules;
function setView(_view) {
view = _view;
}
function setUseScss(_useScss) {
useScss = _useScss;
}
function getUseScss() {
return useScss;
}
function setProxy(_proxy) {
this.PROXY_SERVER = _proxy;
}
function getProxy(){
return PROXY_SERVER;
}
function getVe() {
return ve;
}
function setVe(_ve) {
ve = _ve;
}
function getBrowserify() {
return browserify;
}
function setBrowserify(_browserify) {
browserify = _browserify;
}
function setReinstallNodeModules(_reinstallNodeModules) {
reinstallNodeModules = _reinstallNodeModules;
}
function getReinstallNodeModules() {
return reinstallNodeModules;
}
function getView(){
return view;
}
function customPath() {
return viewJsDir()+'/'+customFile;
}
function customModulePath() {
return viewJsDir()+'/'+customModuleFile;
}
function viewHtmlDir() {
return `primo-explore/custom/${view}/html`;
}
function viewJsDir() {
return `primo-explore/custom/${view}/js`;
}
function mainPath() {
return viewJsDir()+'/*.js';
}
function mainJsPath() {
return viewJsDir()+'/main.js';
}
function customCssMainPath() {
return viewCssDir()+'/*.css';
}
function customColorsPath(){
return `colors.json`;
}
function viewRootDir() {
return `primo-explore/custom/${view}`;
}
function viewCssDir() {
return `primo-explore/custom/${view}/css`;
}
function customScssDir() {
return `primo-explore/custom/${view}/scss`;
}
function customScssMainPath() {
return customScssDir() + "/main.scss";
}
function customCssPath() {
return `primo-explore/custom/${view}/css/custom1.css`;
}
function customNpmModuleRootDir() {
return `primo-explore/custom/${view}/node_modules`;
}
function customNpmJsCustomPath() {
return `primo-explore/custom/${view}/node_modules/primo-explore*/js/custom.js`;
}
function customNpmJsModulePath() {
return `primo-explore/custom/${view}/node_modules/primo-explore*/js/custom.module.js`;
}
function customNpmJsPath() {
return `primo-explore/custom/${view}/node_modules/primo-explore*/js/*.js`;
}
function customNpmCssPath() {
return `primo-explore/custom/${view}/node_modules/primo-explore*/css/*.css`;
}
var SERVERS = {
local: 'http://localhost:8002'
};
/**
* The URL to your sandbox or production Primo instance.
* For SSL environments (https), the port number (443) must be included.
*
* Examples:
* var PROXY_SERVER = 'https://dev-dl.library.vanderbilt.edu:443'
* var PROXY_SERVER = 'https://abc-primo.hosted.exlibrisgroup.com:443'
*
* var PROXY_SERVER = 'https://van-primosb.hosted.exlibrisgroup.com:443';
**/
var PROXY_SERVER = 'https://vanderbilt.primo.exlibrisgroup.com:443';
let buildParams = {
customFile: customFile,
customCssFile: customCssFile,
customPath: customPath,
customModulePath: customModulePath,
mainPath: mainPath,
mainJsPath: mainJsPath,
viewRootDir: viewRootDir,
viewJsDir: viewJsDir,
viewHtmlDir: viewHtmlDir,
viewCssDir: viewCssDir,
customScssDir: customScssDir,
customScssMainPath: customScssMainPath,
customCssPath: customCssPath,
customNpmModuleRootDir: customNpmModuleRootDir,
customNpmJsPath: customNpmJsPath,
customNpmJsCustomPath: customNpmJsCustomPath,
customNpmJsModulePath: customNpmJsModulePath,
customNpmCssPath: customNpmCssPath,
customCssMainPath: customCssMainPath,
customColorsPath: customColorsPath
};
module.exports = {
buildParams: buildParams,
PROXY_SERVER: PROXY_SERVER,
setView: setView,
setUseScss: setUseScss,
getUseScss: getUseScss,
setProxy: setProxy,
getReinstallNodeModules: getReinstallNodeModules,
setReinstallNodeModules: setReinstallNodeModules,
proxy: getProxy,
view: getView,
getBrowserify: getBrowserify,
setBrowserify: setBrowserify,
getVe: getVe,
setVe: setVe
};