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

Function buildStudio

packages/studio/scripts/studio.ts:14–34  ·  view source on GitHub ↗
({ outDir, configPath, base }: BuildOpts)

Source from the content-addressed store, hash-verified

12const appPath = join(__dirname, '..')
13
14export async function buildStudio({ outDir, configPath, base }: BuildOpts) {
15 // Set NODE_ENV to production before importing React to ensure consistent builds
16 process.env.NODE_ENV = 'production'
17
18 const astro = await import('astro')
19 const { default: react } = await import('@astrojs/react')
20 const { default: studio } = await import('@pandacss/astro-plugin-studio')
21
22 try {
23 process.env.PUBLIC_CONFIG_PATH = configPath
24 await astro.build({
25 outDir,
26 root: appPath,
27 integrations: [react(), studio()],
28 devToolbar: { enabled: false },
29 base,
30 })
31 } catch (error) {
32 console.log(error)
33 }
34}
35
36export async function serveStudio({ configPath, port, host, outDir, base }: BuildOpts) {
37 const astro = await import('astro')

Callers

nothing calls this directly

Calls 1

buildMethod · 0.80

Tested by

no test coverage detected