【问题标题】:Why does WebStorm recursively index folders that are using a symlink?为什么 WebStorm 递归索引使用符号链接的文件夹?
【发布时间】:2018-04-12 15:45:48
【问题描述】:

我有一个 TypeScript 项目,其文件夹结构大致如下:

/core/backend 
/core/web
/core/dtos
/core/db

我想在客户端和服务器之间共享 DTO:

 ~/projects/core
 ln -s $PWD/dtos $PWD/web/src/app/dtos
 ln -s $PWD/dtos $PWD/backend/src/app/dtos

这适用于我的两个应用程序。他们编译正确。

问题:

Webstorm 似乎在递归索引符号链接:

容器文件夹看起来很合适,没有杂散链接:

~/projects/core/backend/src/app $ls -l                                                                                                                                                                                                                                                 
drwxr-xr-x   3 jmurphy  staff    96 Apr 11 22:03 bases
drwxr-xr-x  13 jmurphy  staff   416 Apr 12 11:40 controllers
lrwxr-xr-x   1 jmurphy  staff    40 Apr 11 22:03 dtos -> /Users/jmurphy/projects/pienso/core/dtos
drwxr-xr-x   6 jmurphy  staff   192 Apr 11 22:03 injectables
-rw-r--r--   1 jmurphy  staff  6150 Apr 11 22:03 main.ts
drwxr-xr-x   9 jmurphy  staff   288 Apr 12 01:40 models
drwxr-xr-x   3 jmurphy  staff    96 Apr 11 22:03 utils

~/projects/core/backend/src/app $ cd dtos                                                                                                                                                                                                                                              
~/projects/core/backend/src/app/dtos $ ls -al                                                                                                                                                                                                                                           
drwxr-xr-x  18 jmurphy  staff   576 Apr 12 11:19 .
drwxr-xr-x  14 jmurphy  staff   448 Apr 12 11:20 ..
-rw-r--r--   1 jmurphy  staff  1025 Apr 11 22:03 document.dto.ts
-rw-r--r--   1 jmurphy  staff  2302 Apr 12 11:03 lens.dto.ts

如何防止 WebStorm 2018.1 递归索引符号链接文件夹?

【问题讨论】:

  • 请创建支持票,提供可用于重新创建问题的示例项目
  • 当你标记 IDE 时,你不应该同时标记两个,Intellij IDEA 和 WebStorm 没有你想象的那么相关。我会建议对您的问题进行修改。

标签: typescript webstorm


【解决方案1】:

在运行 TypeScript 项目时,如果您不排除“dist”或您设置用于存储已编译资产的任何文件,似乎会出现某种类型的问题。

右键“dist”->“将目录标记为”->排除

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-14
    • 2013-09-12
    • 1970-01-01
    • 1970-01-01
    • 2015-07-16
    相关资源
    最近更新 更多