@loybung/launcher 1.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
const fs = require("fs");
|
2
|
+
const path = require("path");
|
2
3
|
|
3
4
|
async function launcher({ url: url, filepath: filepath }, callback) {
|
4
5
|
const response = await fetch(url);
|
@@ -13,10 +14,9 @@ async function launcher({ url: url, filepath: filepath }, callback) {
|
|
13
14
|
return;
|
14
15
|
}
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
});
|
17
|
+
const app = path.resolve(__dirname, `../../../${filepath}`);
|
18
|
+
const { run } = require(app);
|
19
|
+
callback(run);
|
20
20
|
});
|
21
21
|
}
|
22
22
|
|