chore: update demo
This commit is contained in:
parent
69fbfb3545
commit
20bb9c612b
|
|
@ -86,6 +86,7 @@ function constructFiles(componentName: string, style: RegistryStyle, sources: Re
|
||||||
utils: '@/utils',
|
utils: '@/utils',
|
||||||
components: '@/components',
|
components: '@/components',
|
||||||
},
|
},
|
||||||
|
iconLibrary: 'lucide',
|
||||||
}
|
}
|
||||||
|
|
||||||
const dependencies = {
|
const dependencies = {
|
||||||
|
|
@ -97,7 +98,7 @@ function constructFiles(componentName: string, style: RegistryStyle, sources: Re
|
||||||
'tailwind-merge': 'latest',
|
'tailwind-merge': 'latest',
|
||||||
'tailwindcss-animate': 'latest',
|
'tailwindcss-animate': 'latest',
|
||||||
'lucide-vue-next': 'latest',
|
'lucide-vue-next': 'latest',
|
||||||
'shadcn-vue': 'latest',
|
'shadcn-vue': 'next',
|
||||||
'typescript': 'latest',
|
'typescript': 'latest',
|
||||||
'vaul-vue': 'latest',
|
'vaul-vue': 'latest',
|
||||||
'vue-sonner': 'latest',
|
'vue-sonner': 'latest',
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,11 @@ export async function updateFiles(
|
||||||
// Check for existing folder in UI component only
|
// Check for existing folder in UI component only
|
||||||
if (file.type === 'registry:ui') {
|
if (file.type === 'registry:ui') {
|
||||||
const folderName = basename(dirname(filePath))
|
const folderName = basename(dirname(filePath))
|
||||||
|
const existingFolder = existsSync(dirname(filePath))
|
||||||
|
|
||||||
|
if (!existingFolder) {
|
||||||
|
folderSkipped.set(folderName, false)
|
||||||
|
}
|
||||||
|
|
||||||
if (!folderSkipped.has(folderName)) {
|
if (!folderSkipped.has(folderName)) {
|
||||||
filesCreatedSpinner.stop()
|
filesCreatedSpinner.stop()
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,19 @@ import { Primitive } from 'reka-ui';
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`transformIcons > does nothing 1`] = `
|
||||||
|
"<script setup>
|
||||||
|
import { Check } from 'lucide-vue-next';
|
||||||
|
import { Primitive } from 'reka-ui';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Check />
|
||||||
|
<Primitive />
|
||||||
|
</template>
|
||||||
|
"
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`transformIcons > transforms radix icons 1`] = `
|
exports[`transformIcons > transforms radix icons 1`] = `
|
||||||
"<script setup>
|
"<script setup>
|
||||||
import { CheckIcon } from '@radix-icons/vue';
|
import { CheckIcon } from '@radix-icons/vue';
|
||||||
|
|
|
||||||
|
|
@ -41,4 +41,34 @@ describe('transformIcons', () => {
|
||||||
})
|
})
|
||||||
expect(result).toMatchSnapshot()
|
expect(result).toMatchSnapshot()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('does nothing', async () => {
|
||||||
|
const result = await transform({
|
||||||
|
filename: 'app.vue',
|
||||||
|
raw: `<script lang="ts" setup>
|
||||||
|
import { Check } from 'lucide-vue-next'
|
||||||
|
import { Primitive } from 'reka-ui'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Check />
|
||||||
|
<Primitive />
|
||||||
|
</template>
|
||||||
|
`,
|
||||||
|
config: {
|
||||||
|
style: 'new-york',
|
||||||
|
tailwind: {
|
||||||
|
config: 'tailwind.config.js',
|
||||||
|
css: 'src/assets/index.css',
|
||||||
|
baseColor: 'zinc',
|
||||||
|
cssVariables: true,
|
||||||
|
},
|
||||||
|
aliases: {
|
||||||
|
utils: '@/utils',
|
||||||
|
components: '@/components',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
expect(result).toMatchSnapshot()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user