mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
cli: wrong case
This commit is contained in:
@@ -2,7 +2,7 @@ import { existsSync, promises as fsp } from 'node:fs'
|
||||
import { resolve } from 'pathe'
|
||||
import { defineCommand } from 'citty'
|
||||
import { consola } from 'consola'
|
||||
import { camelCase, snakeCase } from 'scule'
|
||||
import { camelCase, kebabCase } from 'scule'
|
||||
import templates from '../utils/templates.mjs'
|
||||
|
||||
export default defineCommand({
|
||||
@@ -42,7 +42,7 @@ export default defineCommand({
|
||||
|
||||
const themePath = resolve(path, 'src/theme/index.ts')
|
||||
const theme = await fsp.readFile(themePath, 'utf-8')
|
||||
const contents = `export { default as ${camelCase(name)} } from './${snakeCase(name)}'`
|
||||
const contents = `export { default as ${camelCase(name)} } from './${kebabCase(name)}'`
|
||||
if (!theme.includes(contents)) {
|
||||
await fsp.writeFile(themePath, theme.trim() + '\n' + contents + '\n')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user