1

I'm working on quite a large modular project in Webstorm. The js code is compiled with Babel to ./dist folder, so are the assets like html templates and other files.

I would like to EXCLUDE ./dist since when I do a global search of "Navigate to Symbol/Class/etc", I don't want results from ./dist to be shown, so I mark the ./dist folder as excluded.

BUT due to the workflow and the modularity (projects are modules loaded with jspm), I need to commit changed ./dist into VCS (Git). This is our workflow and I can't do anything about that.

The problem:

When I click "Commit changes" I don't see the newly changed files in ./dist when I exclude this folder. Clicking on "Refresh changes" doesn't help.

Can I solve this issue somehow?

UPD

The ./dist directory is NOT in .gitignore

Community
  • 1
  • 1
  • 1
    I'm not that knowledgeable in JetBrains IDEs, just started using them, but just because you exclude a folder for analysis doesn't mean you have to put it in the GIT `.ignore` file. – Some programmer dude Feb 09 '16 at 13:23
  • @JoachimPileborg The folder was ignored only in Webstorm and there's no way it's in `.gitignore`, otherwise the question wouldn't make sense :) – Space Between The Stars Feb 09 '16 at 13:29
  • *How* did "exclude" the directory? Have you set up a scope without the directory (see e.g. http://stackoverflow.com/questions/11129857/how-to-exclude-files-folders-from-code-inspection-in-phpstorm)? Then the directory should still be possible to add to the VCS and it should be updated as usual, but excluded from inspection and analysis (I think). – Some programmer dude Feb 09 '16 at 13:41
  • @JoachimPileborg yeah, that must help, thanks! I have excluded the directory with `Context menu > Mark directory as > Excluded`. – Space Between The Stars Feb 09 '16 at 14:01

1 Answers1

1

You shouldn't exclude this directory from vcs, if you want or need to have it under version control. But for setting the directory, where IDE shouldn't search, you should set up IDE.

You have to remove your directory from git ignore or what ever, and set up ContentRoot in your IDE. I'm using PhpStorm and IntelijIdea, but the settings are common for all JetBrains Products.

Here is the part of JetBrains instruction :

To have files or folders excluded by name
1. Do one of the following: – Open the Settings dialog box, and click Deployment, then click Options below the Deployment node . 
– Choose Tools | Deployment | Options on the main menu. 

2. In the Options dialog box that opens, specify the patterns that define the names of these files and folders in the Exclude items by name text box. Use semicolons as delimiters. Wildcards are welcome. 
The exclusion is applied recursively. This means that if a matching folder has subfolders, the contents of these subfolders are not deployed either. 

So , you can read this : exclude files and restore the settings, and after that, use the next link, to set up the root directory.

Here is the instruction from JetBrains : JetBrains-Content Root

Altenrion
  • 764
  • 3
  • 14
  • 35
  • The directory is not excluded in `.gitignore`. I have searched for ways to disable search in some folders, but all these end up in marking the folder as excluded – Space Between The Stars Feb 09 '16 at 13:31