Absolute paths
hondzik opened this issue · 7 comments
Hi,
I need all files of one type to be created inside specific folder, something like ./AA/BB/[FTName].json
Is it possible to specify absolute path for the new file(s)?
Thanks
I hope I understood your question correctly. Does this look like something you would like to achieve?
...projectroot
- src
- JSON
- <create json file here>
- components
- <create main folder here>
Right now there's no way to have absolute paths for files and I'm thinking that it might be very hard to implement too. I have to think a bit about it.
However if what you need is what I illustrated above then you can use a workaround to achieve that right now.
This is what the template inside the .fttemplates folder would look like.
the content of the ftsettings.json
is
{
"omitParentDirectory": true
}
If you then rightclick on the src
folder (this is important) and then click "Create New Templated Folder" it would create the files like this.
I prepared this template as a zip. If you want feel free to download this template here
Template.zip
Hi,
I will try to specify the use-case on better example.
We use quite deep folder structure. For example we have ...projectroot/src/config/lovs folder, where we store "list of values" definitions in JSON format. I would like to be able to create files from selected template always in this directory, doesn't matter if the user triggers file creation by rightclicking on src, config or lovs folder.
Thank you for your help
Ah I see.
Yes that's currently not possible. I have a rough idea of how to implement it but it's something that has to be done first.
I don't think this will happen before new year unfortunately
I fixed a small typo and merged. thank you :)
Thanks :)
@hondzik @Huuums having a little trouble making it work.
.fttemplates/.ftsettings.json
{
"omitParentDirectory": true,
"absolutePath": true,
"overwriteExistingFiles": "prompt"
}
it keeps creating Example/screens/ExampleScreen/index.tsx
- would like to avoid the root Example/
and have it create the file in screens
.