bruce-cli
Version:
A JS/React App automation build scaffolding with zero-configuration and out-of-the-box
1 lines • 1.09 kB
JavaScript
var x=this&&this.__awaiter||function(o,t,n,r){return new(n||(n=Promise))((function(e,i){function s(o){try{f(r.next(o))}catch(o){i(o)}}function a(o){try{f(r.throw(o))}catch(o){i(o)}}function f(o){var t;o.done?e(o.value):(t=o.value,t instanceof n?t:new n((function(o){o(t)}))).then(s,a)}f((r=r.apply(o,t||[])).next())}))};import{readFileSync as tt,writeFileSync as st}from"node:fs";import{dirname as o}from"node:path";import{exit as s}from"node:process";import{fileURLToPath as n}from"node:url";import{AbsPath as E,CheckPath as He,WaitFor as Ze}from"@yangzw/bruce-us/dist/node.js";import no from"ora";import{LocaleAnswer as er}from"../helpers/index.js";import{LOCALE_TEXT as po}from"../langs/index.js";import{ShowTitle as io}from"../utils/index.js";export default function f(){return x(this,void 0,void 0,(function*(){io("locale");const{lang:t}=yield er(),r=no(po.doing).start(),e=o(n(import.meta.url)),i=He("../langs/index.js",e),a=E("../langs/index."+(i?"js":"ts"),e),f=tt(a,"utf8").replace(/"(.+?)"/,`"./${t}.${i?"js":"ts"}"`);st(a,f,"utf8"),yield Ze(2e3),r.stop(),console.log(po.done),s(1)}))}