How to mark a directory as the root directory of a library?

I have 2 projects in PhpStorm: one is working fine and the other is not working, and I cannot figure out what the first job does.

The first one works well with the library root for bower, npm and composer:

enter image description here

The second is conversation, npm are not recognized as the root of the library: enter image description here

So the behavior in PhpStorm is different, when I use the navigation file in the second project, I see the whole provider file by default:

enter image description here

If I mark the directory as excluded, the ideal does not understand the provider class: enter image description here

So, how can we configure the IDE to mark the directory as the root library?

+5
source share
1 answer

Thanks to @LazyOne's comment, a solution was found: select "Settings" | Languages ​​and Frames | Javascript | Libraries and click "Add." Select the path you want to add and the folder will be marked as the root directory of the library. Really useful for a non-standard path (e.g. not bower_components)

+7
source

Source: https://habr.com/ru/post/1269510/


All Articles