How to check is project is NPM type
已回答
Hello,
Are there IntelliJ APIs to identify if the project is NPM type?
For example, for Maven I use
MavenProjectsManager.getInstance(project).getRootProjects
And for Gradle I use
GradleSettings.getInstance(project).getLinkedProjectsSettings
Is there something similar for npm?
Thank you!
Best regards,
Alex.
请先登录再写评论。
NPM features don't need to configure project model, it can be available in any project. Usually presence of `package.json` is a sign to enable most features.
To get list of all package.json files in a project, use
and to find an ancestor package.json for a file, use
Thank you, Sergey!!! 👍