Home > Software engineering >  StencilJS | How to generate component in a specific directory of the project?
StencilJS | How to generate component in a specific directory of the project?

Time:08-30

When I use "npm run generate" the web component will automatically created in the "component" directory. Can I specify which directory the component will be save?

CodePudding user response:

Found the simple answer in the stenciljs documentation. simply use:

stencil generate [directory]/[component-name]

if stencil is not install globally add npx in the prefix.

npx stencil generate [directory]/[component-name]

CodePudding user response:

If the stencil CLI is installed just run the following command

stencil generate /the-subfolder-path
  • Related