How to get relative path to children in project root for configuration Follow
Hello,
Trying to configure Coffee Script to compile Js in a specific folder with specific folder structure similar, for example
a/b/c/app/x/y/z/file.coffee to be compiled as a/b/c/.temp/app/x/y/z/file.coffee, noting that x,y,z folders are not created by default, and a is the root project folder.
I followed this
https://www.jetbrains.com/help/idea/coffeescript.html
and I have this in the Arguments
```
--output $ProjectFileDir$/my_project/.tmp/$FileDirRelativeToProjectRoot$/ --compile --map $FileName$
```
and this in the Output paths to refresh:
```
$ProjectFileDir$/my_project/.temp/$FileDirRelativeToProjectRoot$/$FileNameWithoutExtension$.js:$ProjectFileDir$/my_project/.temp/$FileDirRelativeToProjectRoot$/$FileNameWithoutExtension$.js.map
```
My problem is here:
$FileDirRelativeToProjectRoot$ => I need to get the relative file to a folder **within** the Project Root, not the root itself.
Noting out that I cannot use absolute path as I need the structure for the files
Please sign in to leave a comment.
To have your generated files placed in a/b/c/.temp/app/x/y/z, try using $FileDirPathFromParent(c)$ macro (c here is a folder name), like:
Arguments: --output $ProjectFileDir$/b/c/.temp/$FileDirPathFromParent(c)$ --compile --map $FileName$
Output paths to refresh: $ProjectFileDir$/b/c/.temp/$FileDirPathFromParent(c)$/$FileNameWithoutExtension$.js:$ProjectFileDir$/b/c/.temp/$FileDirPathFromParent(c)$/$FileNameWithoutExtension$.map:$FileNameWithoutExtension$.js.map