Skip to content

Conversation

sadeghbarati
Copy link
Collaborator

@sadeghbarati sadeghbarati commented Jul 4, 2025

πŸ”— Linked issue

Close #1243

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

  • Add tsConfigPath options to the components.json options schema
  • Check for frameworks for detecting the tsconfig file
  • Add main shadcn-ui CLI changes
  • Use c12 again for loading component.json/json5/js/ts (it is working in Nuxt projects with empty or full components directory)
  • Enable shims and add nodeProtocol: strip to remove node: protocol from the build

πŸ“Έ Screenshots (if appropriate)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

add main shadcn-ui cli changes
use c12 again for loading component.json/json5/js/ts
Copy link

pkg-pr-new bot commented Jul 4, 2025

npm i https://pkg.pr.new/shadcn-vue@1330

commit: 0f5d8a1

@sadeghbarati sadeghbarati added the help wanted Extra attention is needed label Jul 4, 2025
@sadeghbarati sadeghbarati requested a review from zernonia July 5, 2025 16:31
@sadeghbarati sadeghbarati changed the title feat(cli): add back tsconfigPath option to component.json feat(cli): add back tsConfigPath option to component.json Jul 5, 2025
@zernonia
Copy link
Member

Yo @sadeghbarati ! Thanks for adding this field back into the config. I wonder why this wasn't a request on actual ui.shadcn? Perhaps it would be better if we have the same monorepo support?

@sadeghbarati
Copy link
Collaborator Author

sadeghbarati commented Jul 24, 2025

@zernonia

I think the monorepo CLI code is already here

We might need to remove the tsConfigPath option

But in Nuxt 4, we have an issue that this option may resolve it #1340

tsConfigPath is optional


Monorepo is too complicated people is just need to use normal directory for component registry

@sadeghbarati
Copy link
Collaborator Author

sadeghbarati commented Aug 17, 2025

We have multiple choices

  1. make main tsconfig.json/tsconfig.app.json automatically detectable based on framework and framework version (not implemented ❌)
  2. add new flag on init and add CLI like --tsconfig-path (not implemented ❌)
  3. tsConfigPath in components.json (implemented βœ…)

What we should do? which way is more convenient

@sadeghbarati sadeghbarati changed the title feat(cli): add back tsConfigPath option to component.json feat(cli): add tsconfig file detection based on the framework Aug 20, 2025
@sadeghbarati
Copy link
Collaborator Author

sadeghbarati commented Aug 20, 2025

Hi, @zernonia, could you please check this PR? Thank you ❀️

I removed the tsConfigPath option and added the tsconfig detection from the existing projectInfos utilities

The PR also has the latest changes from the main shadcn ui too

There is a lot of room for improvement for detection, but let's start small

@unovue unovue deleted a comment from github-actions bot Aug 20, 2025
@unovue unovue deleted a comment from github-actions bot Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed trigger: preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Allow tsconfig.json path to be configurable
3 participants