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
Please sign in to leave a comment.
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
Thank you for the answer. However, when I transpile a controller module, that file watcher setup generates the following structure:
javascript
controllers
controllers
models
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.
Please see attached.
Attachment(s):
phpStorm.zip
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
OK, I will try again. As far as I know I have no symlinks. Thanks.