wallabyjs / public

Repository for Wallaby.js questions and issues
http://wallabyjs.com
758 stars 45 forks source link

Show annotations and watch files which are symlinked elsewhere in the same IntelliJ project #612

Open vjpr opened 8 years ago

vjpr commented 8 years ago

Issue description or question

IntelliJ Project Tree

- /dev/foo
  - src
    - index.js
    - index.spec.js
  - wallaby.js
  - node_modules
    - bar -> /dev/bar (e.g. if module was npm linked)
- /dev/bar
  - src
    - index.js
    - index.spec.js

wallaby.js

module.exports = {
  files: [
    'src/*.js',
    'node_modules/bar/src', // This is a symlink
  ],
  tests: [
    '**/*.spec.js',
  ]
}

Currently, /dev/foo/node_modules/bar shows annotations and the files are watched.

But this dir is symlinked to /dev/bar which is also in the IntelliJ project tree, and files are not watched and annotations are not shown.

I would like annotations to show on the symlinked dir, /dev/bar, and changes to files in this dir to cause tests to re-run.

This reason for this is being able to have multiple npm modules in one IntelliJ project, symlinked together, and being able to get a live coding experience across npm linked modules.


Although supporting relative file patterns (https://github.com/wallabyjs/public/issues/68) might be an easier solution. I think I would much prefer #68 to be prioritized.

Given this issue's constraint, another alternative may be just to create a wallaby.js above these two projects.


Just to add the workaround I am using now. My npm linked module has a src -> lib transpilation step with a gulp build task that I leave running. I have found that when I change a file in the linked module, then touch a test file in my cwd, the npm linked module is require cached. This forces me to have to use workers.recycle = true which slows things down. I wonder if there is a better way?

Code editor or IDE name and version

WebStorm v11 IntelliJ IDEA v15

citypaul commented 8 years ago

This would be really handy. I'm experiencing the same issue at the moment with an npm linked module.

shiint0 commented 6 years ago

This issue also occurs in VS2017. I have a solution with very long project names, so using relative paths as a workaround is ugly. Any chance of improving symlink support?