Skip to content

How can I have subfolders in the generated folder? #933

Answered by cyrilletuzi
lhanks asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  1. click on the "Create a custom schematic" button and fill the basic inputs (schematic id, name...)
  2. choose "From scratch", as your scenario is an advanced one
  3. in the opened schematic.json, change mainFile to {{fileName}}.module.ts.hbs
  4. add angular in features (not essential for the example but better)
  5. in the files folder, rename the file {{fileName}}.module.ts.hbs (it must match mainFile from step 3)
  6. add all the others files and folders, to have something like this:
  • schematics/
    • module-with-component/ (it will …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cyrilletuzi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants