Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Feb 26, 2025
1 parent 8ca156a commit baf0369
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 8 deletions.
26 changes: 23 additions & 3 deletions docs/app/components/content/ComponentTheme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,37 @@ export default defineAppConfig(${json5.stringify(component.value, null, 2).repla
::
::code-collapse{class="vue-only"}
::code-collapse{class="vue-only ui-only"}
\`\`\`ts [vite.config.ts]
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ${props.pro ? 'uiPro' : 'ui'} from '${props.pro ? '@nuxt/ui-pro/vite' : '@nuxt/ui/vite'}'
import ui from '@nuxt/ui/vite'
export default defineConfig({
plugins: [
vue(),
${props.pro ? 'uiPro' : 'ui'}(${json5.stringify(component.value, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')
ui(${json5.stringify(component.value, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')
.split('\n')
.map((line, i) => i === 0 ? line : ` ${line}`)
.join('\n')})
]
})
\`\`\`
::
::code-collapse{class="vue-only ui-pro-only"}
\`\`\`ts [vite.config.ts]
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import uiPro from '@nuxt/ui-pro/vite'
export default defineConfig({
plugins: [
vue(),
uiPro(${json5.stringify(component.value, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')
.split('\n')
.map((line, i) => i === 0 ? line : ` ${line}`)
.join('\n')})
Expand Down
30 changes: 25 additions & 5 deletions docs/app/components/content/IconsTheme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ export default defineAppConfig(${json5.stringify({
::
::caution{class="ui-pro-only vue-only"}
Nuxt UI Pro v3 does not support Vue yet.
::
::code-collapse{class="vue-only"}
::code-collapse{class="vue-only ui-only"}
\`\`\`ts [vite.config.ts]
import { defineConfig } from 'vite'
Expand All @@ -57,6 +53,30 @@ export default defineConfig({
})
\`\`\`
::
::code-collapse{class="vue-only ui-pro-only"}
\`\`\`ts [vite.config.ts]
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import uiPro from '@nuxt/ui-pro/vite'
export default defineConfig({
plugins: [
vue(),
uiPro(${json5.stringify({
ui: {
icons
}
}, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')
.split('\n')
.map((line, i) => i === 0 ? line : ` ${line}`)
.join('\n')})
]
})
\`\`\`
::
`
Expand Down

0 comments on commit baf0369

Please sign in to comment.