diff --git a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/FileManager.kt b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/FileManager.kt index 7adec6d..1c58f63 100644 --- a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/FileManager.kt +++ b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/FileManager.kt @@ -83,7 +83,9 @@ class FileManager(private val project: Project) { ) } }).filter { file -> - !file.path.contains("/node_modules/") && !file.path.contains("/.git/") + !file.path.contains("/node_modules/") + && !file.path.contains("/.git/") + && !file.parent.name.startsWith('.') }.sortedBy { file -> name.toRegex().find(file.path)?.range?.first ?: Int.MAX_VALUE }.also { diff --git a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/sources/config/ReactConfig.kt b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/sources/config/ReactConfig.kt index b4e8de2..591c2f9 100644 --- a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/sources/config/ReactConfig.kt +++ b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/sources/config/ReactConfig.kt @@ -19,7 +19,8 @@ class ReactConfig( val rsc: Boolean = false, val tsx: Boolean = true, override val tailwind: Tailwind, - override val aliases: Aliases + override val aliases: Aliases, + val iconLibrary: String? = null ) : Config() { /** @@ -49,6 +50,8 @@ class ReactConfig( class Aliases( val components: String, val utils: String, - val ui: String? = null + val ui: String? = null, + val lib: String? = null, + val hooks: String? = null ) : Config.Aliases() } diff --git a/src/test/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/sources/impl/ReactReplacementsTests.kt b/src/test/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/sources/impl/ReactReplacementsTests.kt index 5c523ac..5a998ba 100644 --- a/src/test/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/sources/impl/ReactReplacementsTests.kt +++ b/src/test/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/sources/impl/ReactReplacementsTests.kt @@ -22,8 +22,11 @@ class ReactReplacementsTests : ReplacementsTests() { aliases = ReactConfig.Aliases( components = "@/components", utils = "@/lib/utilsReplaced", - ui = if (useNotNullUI) "@/ui" else null - ) + ui = if (useNotNullUI) "@/ui" else null, + lib = "@/lib", + hooks = "@/hooks" + ), + iconLibrary = "lucide" ) public override fun adaptFileToConfig(file: PsiFile) {