MCPcopy Create free account
hub / github.com/chakra-ui/panda / reloadConfigAndRefreshContext

Method reloadConfigAndRefreshContext

packages/node/src/diff-engine.ts:15–23  ·  view source on GitHub ↗

* Reload config from disk and refresh the context

(fn?: (conf: LoadConfigResult) => void)

Source from the content-addressed store, hash-verified

13 * Reload config from disk and refresh the context
14 */
15 async reloadConfigAndRefreshContext(fn?: (conf: LoadConfigResult) => void) {
16 const conf = await loadConfig({ cwd: this.ctx.config.cwd, file: this.ctx.conf.path })
17
18 // attach tsconfig options from previous config
19 const { tsconfig, tsconfigFile, tsOptions } = this.ctx.conf
20 Object.assign(conf, { tsconfig, tsconfigFile, tsOptions })
21
22 return this.refresh(conf, fn)
23 }
24
25 /**
26 * Update the context from the refreshed config

Callers 3

mainFunction · 0.80
BuilderClass · 0.80
generateFunction · 0.80

Calls 2

refreshMethod · 0.95
loadConfigFunction · 0.90

Tested by

no test coverage detected