Bundling generated files for a coffeescript file

Hi,

were using coffeescript and whenever someone else creates a .coffee file and you check it out [via git], phpStorm doesn't associate the generated .map and .js files with the .coffeescript file. That means that your working directory is full of .map and .js files and is absoultely chaotic and it's hard to find your files.

If delete the map and js files and let phpStorm create it on you local machine, the map and js files will be filed under your .coffee file, just like your coffee file was a folder and the associated map and js files were it's children. That means that if you open a directory, you only see a clean list of .coffee files. That is the desired behaviour.

However, like I said, if you check out files from a remote source, map and js files lie around and makes it hard for you to navigate. That's even worse if you check out a project from anew and all your directories are unreadable.

So... is there a command or an option to let phpStorm correctly associate map and js files to coffee files, so the get bundled in that nice and clean way it has when you create coffeescript files on your own machine?

Thanks you
Lukas

4 comments
Comment actions Permalink

Hello!

no, there is no such option. This is a filewatcher that establishes the  relationship between the source and the generated file when being run.  We have a feature request to enable grouping (based on file watcher  configuration) if the transpiling is performed by other tools - see http://youtrack.jetbrains.com/issue/WEB-7635
But we haven't yet found a solution fore this that won't affect the tree drawing performance

0
Comment actions Permalink

Hi Elena!

Thank you for your answer! But I just have to ask, sorry: Is there no way I can delete all of my js and map files and have the filewatcher generate all the files for me again so they will be bundled?

0
Comment actions Permalink

Sure! Since PHPStorm 7 you can recompile the whole project/selected  folder/file using 'Run file watchers' command: just select a  file/folder, hit Ctrl+Shift+A -> Ctrl+Shift+A to enable non-menu  actions -> type "run file " -> choose Run File Watchers.... You  can assign custom shortcut for "Plugins | File Watchers | Run File  Watchers" action in Settings | Keymap to make this procedure less  complicated.

0
Comment actions Permalink

Thank you, this was exactly what I was looking for! Perfect!

0

Please sign in to leave a comment.