jxp 2.12.3 → 2.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/setup.js +3 -2
- package/package.json +1 -1
package/bin/setup.js
CHANGED
|
@@ -81,8 +81,9 @@ async function main() {
|
|
|
81
81
|
await mkdir(path.join(destination_path, "models"));
|
|
82
82
|
await mkdir(path.join(destination_path, "config"));
|
|
83
83
|
await mkdir(path.join(destination_path, "logs"));
|
|
84
|
+
await mkdir(path.join(destination_path, "libs"));
|
|
84
85
|
await cp_replace("../config_sample.json", path.join(destination_path, "config/default.json"), opts, "{", "}");
|
|
85
|
-
await cp_replace("./server.js", path.join(destination_path, "bin/server.js"), { "../libs/jxp": "jxp" });
|
|
86
|
+
await cp_replace("./server.js", path.join(destination_path, "bin/server.js"), { "../libs/jxp": "jxp/libs/jxp", "../libs/connection_string": "jxp/libs/connection_string" });
|
|
86
87
|
for (let model of models) {
|
|
87
88
|
await cp("../models/" + model + "_model.js", path.join(destination_path, "models/" + model + "_model.js"));
|
|
88
89
|
}
|
|
@@ -149,7 +150,7 @@ async function main() {
|
|
|
149
150
|
* Copy from to replacing text as we go
|
|
150
151
|
*
|
|
151
152
|
*/
|
|
152
|
-
function cp_replace(from, to, opts, startEnclosure, endEnclosure) {
|
|
153
|
+
function cp_replace(from, to, opts, startEnclosure = "", endEnclosure = "") {
|
|
153
154
|
startEnclosure = startEnclosure || "";
|
|
154
155
|
endEnclosure = endEnclosure || "";
|
|
155
156
|
from = path.join(__dirname, from);
|
package/package.json
CHANGED