UNPKG

constatic

Version:

Constatic is a CLI for creating and managing modern TypeScript projects, providing an organized structure and features that streamline development.

2 lines (1 loc) 734 B
import{cliLang as n}from"#helpers";import{readPackageJSON as a}from"pkg-types";import{CLIConfig as i}from"./config.js";import{EnvManager as o}from"./env.js";import{CLIShell as s}from"./shell.js";import l from"node:path";import{CLITemplates as g}from"./templates.js";import{CLIFileSystem as m}from"./fs.js";export*from"./env.js";class v{static async init(e){const t=await a(l.join(e,"package.json")),r=new this(e,t);return await r.templates.load(),r}pkg;config;shell;templates;fs;get lang(){return n.get()}rootname;constructor(e,t){this.pkg={...t,version:t.version??"0.0.0"},this.config=i.init(this.pkg.name),this.rootname=e,this.shell=new s,this.templates=new g(e),this.fs=new m}createEnvManager(e){return new o(e)}}export{v as CLI};