How to get relative path to children in project root for configuration



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/ to be compiled as a/b/c/.temp/app/x/y/z/, noting that x,y,z folders are not created by default, and a is the root project folder.

I followed this

and I have this in the Arguments


--output $ProjectFileDir$/my_project/.tmp/$FileDirRelativeToProjectRoot$/ --compile --map $FileName$


and this in the Output paths to refresh:




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


1 comment
Comment actions Permalink

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$


Please sign in to leave a comment.