File watcher setup

Help!  I seem to be beating my head against the wall trying to set up some file watchers.

My TypeScript Express/Nodejs project structure looks like:

Project
     controllers
          Typescript files
     models
          Typescript files
     middleware
          Typescript files
     javascript
          controllers
          models
          middleware

I want the Typescript files to transpile into the corresponding javascript directories.  What is the correct configuration of the file watchers to accomplish this?  Thanks.

Larry Drews

0
6 comments

Please try the following:

Arguments: --sourcemap --outDir $ProjectFileDir$/javascript/$FileDirRelativeToProjectRoot$ $FileName$
Working directory: $FileDir$
Output paths to refresh: $ProjectFileDir$/javascript/$FileDirRelativeToProjectRoot$/$FileNameWithoutExtension$.js:$ProjectFileDir$/javascript/$FileDirRelativeToProjectRoot$/$FileNameWithoutExtension$.js.map

0

Thank you for the answer.  However, when I transpile a controller module, that file watcher setup generates the following structure:

javascript
     controllers
          controllers
          models

0

Hmm.. Doesn't happen to me using similar project structure and watcher settings above.
Please can you attach a sample project that shows up the issue? With file watcher configured, of course.

0

Please see attached.



Attachment(s):
phpStorm.zip
0

works as expected for me using your project. All I did was enabling 'TypeScript App' watcher and then modifying collectData.ts - see screenshot for watcher execution results

Do you have any symlinks in your project/path to  it? May be, the $FileDirRelativeToProjectRoot$ is not resolved correctly because of them?



Attachment(s):
fw.png
0

OK, I will try again.  As far as I know I have no symlinks.  Thanks.

0

Please sign in to leave a comment.