constatic
Version:
Constatic is a CLI for creating and managing modern TypeScript projects, providing an organized structure and features that streamline development.
24 lines (22 loc) • 485 B
JavaScript
// src/cli/templates.ts
import { json } from "#helpers";
import path from "node:path";
class CLITemplates {
rootname;
botProps;
botPath;
constructor(rootname) {
this.rootname = rootname;
this.botPath = path.join(this.rootname, "templates", "discord/bot");
}
async load() {
const propsPath = path.join(this.botPath, "properties.json");
this.botProps = await json.read(propsPath);
}
get bot() {
return this.botProps;
}
}
export {
CLITemplates
};