@@ -21,6 +21,7 @@ const sendFile = async (urlPath, data) => {
|
||||
}
|
||||
};
|
||||
|
||||
const doIt = async () => {
|
||||
// Get system utils
|
||||
execSync("apt update", { encoding: "utf8" });
|
||||
execSync("apt install -y pipx", { encoding: "utf8" });
|
||||
@@ -33,9 +34,7 @@ await sendFile(`__init__.mpy`, new ArrayBuffer(0));
|
||||
packageJsonUrls.push([`${libName}/__init__.mpy`, "__init__.mpy"]);
|
||||
|
||||
// Generate module folders/files
|
||||
readdirSync(".")
|
||||
.filter((f) => f.slice(-2) == "py")
|
||||
.forEach(async (moduleFile) => {
|
||||
for (let moduleFile of readdirSync(".").filter((f) => f.slice(-2) == "py")) {
|
||||
const modName = moduleFile.slice(0, -3);
|
||||
const modInitPath = `${modName}/__init__.mpy`;
|
||||
const modPyPath = `${modName}.mpy`;
|
||||
@@ -52,7 +51,7 @@ readdirSync(".")
|
||||
console.log("FARTS");
|
||||
packageJsonUrls.push([`${libName}/${modInitPath}`, "__init__.mpy"]);
|
||||
packageJsonUrls.push([`${libName}/${modName}/${modPyPath}`, modPyPath]);
|
||||
});
|
||||
}
|
||||
|
||||
console.log(packageJsonUrls);
|
||||
|
||||
@@ -65,3 +64,6 @@ await sendFile(
|
||||
version: version,
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
doIt();
|
||||
|
||||
Reference in New Issue
Block a user