MCPcopy Create free account
hub / github.com/formkit/formkit / addConfigProperty

Function addConfigProperty

packages/cli/src/createApp.ts:584–595  ·  view source on GitHub ↗

* Helper to add a property to the nuxt config content.

(configContent: string, property: string)

Source from the content-addressed store, hash-verified

582 * Helper to add a property to the nuxt config content.
583 */
584function addConfigProperty(configContent: string, property: string): string {
585 // Find a good insertion point - after any existing property or at the start
586 const trimmed = configContent.trim()
587 if (trimmed.length === 0) {
588 return `\n ${property},\n`
589 }
590 // Add after the first line break or at the start
591 if (configContent.startsWith('\n')) {
592 return `\n ${property},${configContent}`
593 }
594 return `\n ${property},\n${configContent}`
595}
596
597/**
598 * Builds the formkit.config.ts file.

Callers 1

setupNuxtConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected