如何配置WebStorm / PhpStorm项目,以便JS代码智能适用于Node.js项目? [英] How to configure WebStorm / PhpStorm project so that JS code intelligence works well for Node.js projects?

查看:144
本文介绍了如何配置WebStorm / PhpStorm项目,以便JS代码智能适用于Node.js项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WebStorm / PhpStorm / IDEA中,内置了JavaScript的代码智能功能相当多。但是,在开发Node.js应用程序时,包括来自 node_modules 使导航到文件之类的问题复杂化(我不希望IDE从 node_modules <中提供数十个 package.json s / code>文件夹,例如)。但是排除 node_modules 文件夹完全有其自身的问题 - 没有代码完成等。

In WebStorm / PhpStorm / IDEA, there are quite a lot of code intelligence feature for JavaScript built in. However, when developing a Node.js application, including everything from node_modules complicates matters with things like "Navigate to file" (I don't want the IDE to offer me tens of package.jsons from node_modules folder, for example). But excluding the node_modules folder entirely has its own problems - there is no code completion etc.

那么什么是对在WebStorm中接近这个的方法?我应该只包含 node_modules 中的一些文件吗?或者从那里排除所有内容并以某种方式使用项目或全局库的概念?

So what's the "right" way to approach this in WebStorm? Should I include only some of the files from node_modules? Or exclude everything from there and somehow use the concept of project or global libraries?

谢谢。

推荐答案

这已在WebStorm 7中修复,请参阅 http:// youtrack。 jetbrains.com/issue/WEB-1927

This has been fixed in WebStorm 7, see http://youtrack.jetbrains.com/issue/WEB-1927.

这篇关于如何配置WebStorm / PhpStorm项目,以便JS代码智能适用于Node.js项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆