How can I have subfolders in the generated folder? #933
-
I can't seem to find a way to get the extension to generate subfolders. I would like to have a schematic that looks like the following: component/file.component.ts Is it possible to generate this file layout? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @lhanks, All files in the Here are the steps to match your example:
That is it. You can now generate the schematic. Be sure to have the just released version 6.15.1 of the extension installed and applied, as I ran into a few bugs when reproducing this scenario, which I fixed (it may require 2 VS Code restarts, one the the extension to update, the second one for the update to be applied). |
Beta Was this translation helpful? Give feedback.
Hello @lhanks,
All files in the
files
folder of your custom schematic will be generated by the extension, included the ones in subfolders.Here are the steps to match your example:
schematic.json
, changemainFile
to{{fileName}}.module.ts.hbs
angular
infeatures
(not essential for the example but better)files
folder, rename the file{{fileName}}.module.ts.hbs
(it must matchmainFile
from step 3)schematics/
module-with-component/
(it will …