@reliverse/rse-sdk
Version:
@reliverse/rse-sdk allows you to create new plugins for @reliverse/rse CLI, interact with reliverse.org, and even extend your own CLI functionality (you may also try @reliverse/dler-sdk for this case).
20 lines (19 loc) • 656 B
JavaScript
import { relinka } from "@reliverse/relinka";
import { execaCommand } from "execa";
import { lookpath } from "lookpath";
export async function useLanguine(projectPath) {
relinka("verbose", `Using: ${projectPath}`);
if (!await isLanguineInstalled()) {
relinka("info", "Installing the translation addon...");
await execaCommand("bun add -g languine", { stdio: "inherit" });
}
relinka(
"success",
"Please execute the following command: `languine`",
"Note: This addon must currently be run manually."
);
}
async function isLanguineInstalled() {
const commandPath = await lookpath("languine");
return commandPath !== void 0;
}