Closed tpluscode closed 7 years ago
Paths for templates (and styles) are relative to project dir atm. Would it be more intuitive if it was relative to the file itself?
Paths for templates (and styles) are relative to project dir atm.
AFAICT not always. Works fine when I run
twc src/elements/ags-field.ts --outDir dist/elements
Would it be more intuitive if it was relative to the file itself?
I think so. Parameter relative to current file just like <link>
etc.
Oh my bad, it's relative to base path. Base path is either provided with --rootDir
(you tried with src
, but your files are deeper) or calculated the same way tsc
does it (longest common path). Nevertheless I will make it relative to the file itself, it should not rely on path that might change (didn't think of that before).
(didn't think of that before)
Hey, that's why you have a private beta-tester :)
Haha true :D. Thanks for helping ;). TWC quality would be very bad without your help :).
Fixed in #66.
In my project the structure of source and destination files is as follows (part relevant to a single element)
In
ags-field.ts
I use the@template
decorator:I want to process the entire
src
folder with twc using commandtwc src/**/*.ts --outDir dist
but it throws an exception:As you can see, the path is incorrectly calculated. Should be
\augeas\src\elements\ags-field.html
.I tried with
--rootDir src
but the exact same error is thrown.