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? |
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). |
Hello @lhanks,
All files in the
filesfolder 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, changemainFileto{{fileName}}.module.ts.hbsangularinfeatures(not essential for the example but better)filesfolder, rename the file{{fileName}}.module.ts.hbs(it must matchmainFilefrom step 3)schematics/module-with-component/(it will …