Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vscode): configure multiple subdirs #2101

Merged
merged 1 commit into from Jan 25, 2023
Merged

feat(vscode): configure multiple subdirs #2101

merged 1 commit into from Jan 25, 2023

Conversation

MellKam
Copy link
Contributor

@MellKam MellKam commented Jan 20, 2023

#1764

now you can pass array to unocss.root

"unocss.root": ["apps/a", "apps/b"]

or just a string as before

"unocss.root": "apps/c"

@MellKam MellKam requested a review from antfu as a code owner January 20, 2023 18:54
@netlify
Copy link

netlify bot commented Jan 20, 2023

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a49f8f9
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/63cae350a0262e0008a50fbc
😎 Deploy Preview https://deploy-preview-2101--unocss.netlify.app/play
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@tobiasdalhof
Copy link

tobiasdalhof commented Jan 21, 2023

Why not use the first unocss config found when searching the directory tree starting from the currently open file?

Update: Question clarified

@MellKam
Copy link
Contributor Author

MellKam commented Jan 21, 2023

Why not use the first unocss config found when searching the file tree in reverse for convenience?

But what if I want to use more than one config in my project? For example I have uikit and frontend app in one monorepo.

UPD: Maybe I misunderstood you. Do you want to search from the currently open file up the directory tree to the first config found?

@tobiasdalhof
Copy link

tobiasdalhof commented Jan 21, 2023

UPD: Maybe I misunderstood you. Do you want to search from the currently open file up the directory tree to the first configurator found?

Yes 👍

If searching the tree is hard on performance, maybe cache the root for all files in the found directory that contains the config?

Example getConfigFile function from Volar: https://github.com/johnsoncodehk/volar/blob/master/vue-language-tools/vscode-vue/src/features/preview.ts#L445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants