Ready for release

This commit is contained in:
Henry Hiles 2022-04-26 14:21:08 -04:00
parent 31d29253ab
commit d0124cef8a
3 changed files with 121 additions and 105 deletions

View file

@ -9,20 +9,18 @@ const execWithPromise = async (command, options) =>
)
)
contextBridge.exposeInMainWorld("package", {
install: async (link) => {
const packagesPath = resolve(__dirname, "..")
try {
await execWithPromise(`git clone ${link[0]}`, {
cwd: packagesPath,
})
contextBridge.exposeInMainWorld("installPackage", async (link) => {
const packagesPath = resolve(__dirname, "..")
try {
await execWithPromise(`git clone ${link[0]}`, {
cwd: packagesPath,
})
await execWithPromise("pnpm i --production", {
cwd: join(packagesPath, link[7]),
})
} catch (error) {
console.error(error)
return true
}
},
await execWithPromise("pnpm i --production", {
cwd: join(packagesPath, link[7]),
})
} catch (error) {
console.error(error)
return true
}
})