New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm run generate prefixes #2021
Comments
I ran into this today when going through the tutorial and trying out the generator. When I run
I was expecting the directory to be I see from the Styleguide that a prefix is needed to fix the issue, so |
Why is the prefix removed from the component? Are there any reason for that, or it is current issue? |
Can @corysmc or @adamdbradley offer some insight? Would you be open to a |
Just adding my thoughts -- I feel that if you're going to provide tooling, utilities, CLIs, etc... the "default" should absolutely dog-food your own rules. So, a generator that violates your own style guide rules out-of-the-box just smells wrong 😅 |
Actually with the latest version of stencil this generation of components works oposite. It generates with prefix :D |
@erichstark -- Yeah, that's what led me to this finding this issue. For some reason, the change was removed, and, imo, the way the generator is working now (violating the style guide by default) is the wrong decision. |
wanted to add my two cents that it seems the new generator doesn't seem to follow the style guide because it adds MyButton instead of just Button Would be good to have the choice to add prefixes or not in the file / folder names |
Hey all, I apologize that it took so long for someone on the team to acknowledge this issue. As it stands today, running something like
With a component like: import { Component, Host, h } from '@stencil/core';
@Component({
tag: 'page-home',
styleUrl: 'page-home.css',
shadow: true,
})
export class PageHome {
// omitted
} I think there are two things for the Stencil team to consider here:
That is all to say, I'm going to label this to get it ingested into our backlog for the team to take a closer look. Thanks! |
Stencil version:
I'm submitting a:
[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
For good reasons I'm sure, the very handy
npm run generate
tool has changed to remove the prefix from components (#1992).However, for projects that already use this tool (and have 100s of components and prefixes everywhere) it means quite a bit of extra faff to go through and manually rename everything.
Would you consider a command switch
--keep-prefix
to use the full name of the component?Or if there is a way to clone and adapt the tool and keep in my project, please could somebody point me to the relevant documentation?
😄
The text was updated successfully, but these errors were encountered: