javascripttypescriptphpstormyui-compressor

PhpStorm: YUI Compressor JS doesn't work with typescript


I've stucked with the problem in PhpStorm. I've added File Watcher for js files to minimize them (I'm using YUI Compressor JS). It works correct for js files and creates .min.js versions. But when I've created typescript file with the same name, YUI Compressor doesn't process js-file anymore.

For example if I have just one file script.js, YUI Compressor generates script.min.js successfully. But if I have 2 files script.ts and script.js and try to modify script.js, YUI Compressor doesn't generate script.min.js (no error output or any output at all, YUI Compressor doesn't fire).

Does anybody know what's wrong with it?

UPDATE:

LazyOne's solution (edit workspace.xml) works! But it seems oddly that I should use such workaround actions to do typical task. I never used typescript before, but a lot of peoples do. So, I think it should be typical task for them to minify js generated from typescript for production. Is there any other way for implementing task using standard built-in features in PHPStorm?


Solution

  • The built-in TypeScript compiler, when enabled, auto-excludes the generated .js files from indexing for better performance and navigation by adding them to exactExcludedFiles list in workspace.xml. Related ticket: WEB-24568.

    As a workaround, you need adding <option name="excludeGeneratedFiles" value="false" /> to your project workspace.xml:

     <component name="TypeScriptGeneratedFilesManager">
       <option name="version" value="1" />
       <option name="excludeGeneratedFiles" value="false" />
       <option name="exactExcludedFiles">
         <list>
         </list>
       </option>
     </component>