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) 427 B
import{cliLang as n,detectLanguage as r,equalsIgnoringCase as i}from"#helpers";import o from"conf";import s from"node:path";class d extends o{static init(e){const t=new this({projectName:e,defaults:{"discord.bot.tokens":[],"presets.scripts":[],lang:r()}});return n.set(t.get("lang")),t}get dirname(){return s.dirname(this.path)}getToken(e){return this.get("discord.bot.tokens",[]).find(t=>i(t.name,e))}}export{d as CLIConfig};