testeranto 0.79.61 → 0.79.62
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/dist/module/Puppeteer.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import readline from "readline";
|
|
2
2
|
import fs from "fs";
|
|
3
|
+
import watch from "recursive-watch";
|
|
3
4
|
import { PM_Main } from "./PM/main.js";
|
|
4
5
|
import { destinationOfRuntime } from "./utils.js";
|
|
5
6
|
var mode = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
@@ -68,9 +69,7 @@ export default async (partialConfig) => {
|
|
|
68
69
|
}
|
|
69
70
|
});
|
|
70
71
|
console.log("ready and watching for changes...", config.buildDir);
|
|
71
|
-
|
|
72
|
-
recursive: true,
|
|
73
|
-
}, (eventType, changedFile) => {
|
|
72
|
+
watch(config.buildDir, (eventType, changedFile) => {
|
|
74
73
|
if (changedFile) {
|
|
75
74
|
config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
76
75
|
if (eventType === "change" || eventType === "rename") {
|
|
@@ -96,4 +95,45 @@ export default async (partialConfig) => {
|
|
|
96
95
|
});
|
|
97
96
|
}
|
|
98
97
|
});
|
|
98
|
+
// does not work on linux
|
|
99
|
+
// fs.watch(
|
|
100
|
+
// config.buildDir,
|
|
101
|
+
// {
|
|
102
|
+
// recursive: true,
|
|
103
|
+
// },
|
|
104
|
+
// (eventType, changedFile) => {
|
|
105
|
+
// if (changedFile) {
|
|
106
|
+
// config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
107
|
+
// if (eventType === "change" || eventType === "rename") {
|
|
108
|
+
// if (
|
|
109
|
+
// changedFile ===
|
|
110
|
+
// test
|
|
111
|
+
// .replace("./", "node/")
|
|
112
|
+
// .split(".")
|
|
113
|
+
// .slice(0, -1)
|
|
114
|
+
// .concat("mjs")
|
|
115
|
+
// .join(".")
|
|
116
|
+
// ) {
|
|
117
|
+
// pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
118
|
+
// }
|
|
119
|
+
// if (
|
|
120
|
+
// changedFile ===
|
|
121
|
+
// test
|
|
122
|
+
// .replace("./", "web/")
|
|
123
|
+
// .split(".")
|
|
124
|
+
// .slice(0, -1)
|
|
125
|
+
// .concat("mjs")
|
|
126
|
+
// .join(".")
|
|
127
|
+
// ) {
|
|
128
|
+
// pm.launchWeb(
|
|
129
|
+
// test,
|
|
130
|
+
// destinationOfRuntime(test, "web", config),
|
|
131
|
+
// sidecars
|
|
132
|
+
// );
|
|
133
|
+
// }
|
|
134
|
+
// }
|
|
135
|
+
// });
|
|
136
|
+
// }
|
|
137
|
+
// }
|
|
138
|
+
// );
|
|
99
139
|
};
|