Webstorm JavaScript 外部库与项目目录
Webstorm JavaScript External Libraries vs Project Directories
在 IIS 和 VS 中,有虚拟目录允许在脚本标记中进行简化、虚拟、相对引用。它们很方便。在 WebStorm 中,您可以获得与项目目录相同的效果,然后将您的项目根标记为资源根。如果这样做,您还可以在文本编辑器中获得编码帮助。
WebStorm 也有外部库,这些有什么意义?
当你的脚本标签中有一个 CDN 的 link 并且你想获得编码帮助时,这是吗?如果您已经有了项目目录,那么外部库有什么意义?
我看过 并且我有点了解 referencing/inclusion 的不同模式,但我不了解全局。外部库与项目目录的核心原因是什么?
Is this for when you have a link to a CDN in your script tag and you want to get coding assistance?
是的,这是最常见的情况 - WebStorm 无法使用在线资源进行代码帮助,它需要在本地提供相应的 javascript 文件。所以,如果您不想让所有这些库文件污染您的项目文件夹,您可以将它们存储在您的项目之外并设置为库。
What is the core reason for the External Libraries vs the Project Directories?
见上文 - 外部库允许将库文件存储在项目文件夹外的任意位置,并且仍然可以获得代码 completion/highlighting/etc。请同时查看您所指的:
Note also that libraries are 'light-weight' as compared to .js files in your project - they are treated read-only, have the inspections turned off. Plus, you can assign documentation URLs to them, enabling external documentation for library code. So, even if you have your library files in your project, it might make sense to add them as libraries
在 IIS 和 VS 中,有虚拟目录允许在脚本标记中进行简化、虚拟、相对引用。它们很方便。在 WebStorm 中,您可以获得与项目目录相同的效果,然后将您的项目根标记为资源根。如果这样做,您还可以在文本编辑器中获得编码帮助。
WebStorm 也有外部库,这些有什么意义?
当你的脚本标签中有一个 CDN 的 link 并且你想获得编码帮助时,这是吗?如果您已经有了项目目录,那么外部库有什么意义?
我看过
Is this for when you have a link to a CDN in your script tag and you want to get coding assistance?
是的,这是最常见的情况 - WebStorm 无法使用在线资源进行代码帮助,它需要在本地提供相应的 javascript 文件。所以,如果您不想让所有这些库文件污染您的项目文件夹,您可以将它们存储在您的项目之外并设置为库。
What is the core reason for the External Libraries vs the Project Directories?
见上文 - 外部库允许将库文件存储在项目文件夹外的任意位置,并且仍然可以获得代码 completion/highlighting/etc。请同时查看您所指的
Note also that libraries are 'light-weight' as compared to .js files in your project - they are treated read-only, have the inspections turned off. Plus, you can assign documentation URLs to them, enabling external documentation for library code. So, even if you have your library files in your project, it might make sense to add them as libraries