How to hide .js and .map files in WebStorm while working on Angular2-typescript project

后端 未结 4 785
故里飘歌
故里飘歌 2021-02-02 07:49

I tried adding the extensions to .gitignore but the result is as below:

The files are not completely hidden.

4条回答
  •  长情又很酷
    2021-02-02 08:34

    When using WebStorm without the built-in TypeScript Compiler (e.g. because you are running an Angular2 project with their npm start script which does the compiling already) and the other method doesn't work, you can configure your own filtered "Project" panel for WebStorm:

    1. Select Project Files section of the side panel (Project section does not offer the needed config menu)
    2. Click on the gear icon to configure
    3. Select "Edit Scopes" from that menu
    4. Add a new Scope
    5. Set the Pattern to an appropriate filter to exclude the *.js and *.js.map files (I am using !file[my-root-folder]:app//*.js&&!file[my-root-folder]:app//*.js.map)
    6. You can select this scope as a section of the side panel (instead of Project or Project Files) under the name you set the scope.

提交回复
热议问题