Can we create multiple files from a file template

If I create a new html template I want it also to create a javascript file as well.  It would be usefull to just run another file template or multple templates from a main template

Example could be having a box in a template that says run templates and you could also pass in the same name or a new name based on variables.  So if I have defined a custom html template and a custom javascript template I can call the javascript template from the html template.  Which would result in creating two files both the html and javascript files but you can call as many other templates as you want.  You could have a template that calls a template and that template calls another template ect ect...

0
1 comment

Hi there,

Currently that is not possible.

Some related tickets:



Currently possible alternatives (based on situation, of course)

  • use some 3rd party tool like yeoman -- it can generate project skeletons -- it may also be able to do just few files as well (not using it myself, so not so sure)
  • if you need to create some file (e.g. html) and some related file that is referenced in this file (e.g. .css/.js) -- once main file is created you can quickly create such related file(s) via Alt+Enter while having caret on such non-existing file reference -- https://www.jetbrains.com/webstorm/quickstart/screenshots/quick_fix.png
  • Some command line script that you may call via External Tools functionality
  • Or maybe some gulp/grunt/phing task
0

Please sign in to leave a comment.