Skip to content

Commit

Permalink
fix(shadcn-ui): Create react libs instead of node
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed Jan 18, 2024
1 parent e284cdf commit b9922b3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/shadcn-ui/src/generators/init/init.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import {
Tree, updateProjectConfiguration, writeJson
} from '@nx/devkit'
import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils'
import { addTsConfigPath, libraryGenerator } from '@nx/js'
import { Linter } from '@nx/eslint'
import { addTsConfigPath } from '@nx/js'
import { libraryGenerator } from '@nx/react'
import { join } from 'path'

import type { ShadecnUiSchema } from './schema'
Expand Down Expand Up @@ -41,7 +43,9 @@ function getLibRoot(host: Tree, fileName: string) {
export default async function (tree: Tree, options: ShadecnUiSchema) {
await libraryGenerator(tree, {
name: options.uiName,
skipFormat: true
skipFormat: true,
style: 'css',
linter: Linter.EsLint
})

const uiLibOptions = await determineProjectNameAndRootOptions(tree, {
Expand All @@ -56,7 +60,9 @@ export default async function (tree: Tree, options: ShadecnUiSchema) {

await libraryGenerator(tree, {
name: options.utilsName,
skipFormat: true
skipFormat: true,
style: 'css',
linter: Linter.EsLint
})

const utilsLibOptions = await determineProjectNameAndRootOptions(tree, {
Expand Down

0 comments on commit b9922b3

Please sign in to comment.