-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Generate remove the first word of files and folder #2141
Comments
I think this is because the first part (the string before dash) is interpreted as a prefix. Ex:, lorem-ipsum is like ion-input. The "ion-" part is the prefix, and shouldn't be included in the filename. I dont know how we can handle this |
In my projects it always made sense to remove the prefix. I suggest making it configurable. However right now the docs don't mention the removal of the prefix and should probably be changed. |
Oh man, this bug caused me some serious headscratching. Which contains @Component({
...
export class Component {
... And that is proper invalid |
I love this tool 'not a framework' but the generate option is a complete pain in the A$$... The outcome is completely unexpected and @juanmiguelbesada explanation above is just nonsense. If I create a component 'self-container' I'm expecting a folder structure and file naming convention to reflect that. The Class that gets created, without the prefix, now has a VERY HIGH potential to clash with imported classed from other libraries.... So I have stopped using the generate option because it's... well, basically useless Come on... This needs fixing ASAP. |
i'm going for this. @adamdbradley should I target 1.8.x or master? |
A perfect example of what @entozoon pointed out
Thats just not going to work |
It looks like it is already fixed in 1.9 try |
Nope... Now the g for generate short command has been removed and the outcome for file names and classes is the same
So in my book this is a step backwards |
So..... I ran the command your way as follows
And it DOES generate the expected file names and class name under the WRONG folder structure. Now I have a folder structure under the project root that reflects my full User folder as shown in the output above. This is even more broken than the previous functionality... |
Does anybody know if this issue is being addressed ? Because in my opinion this is a pretty serious issue. |
Has this issue been fixed or is it being fixed? I would like to look into it and make a pull request to fix it. |
Fixed! |
Stencil version:
I'm submitting a:
[x] bug report
[ ] 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/
Current behavior:
I try to run command
stencil generate lorem-ipsum
but instead of generating folderlorem-ipsum
it's generated folderipsum
. But the tag component and test name are correct though.Expected behavior:
It should generate files and the folder with
lorem-ipsum
Steps to reproduce:
Run
Related code:
// insert any relevant code here
Other information:
The text was updated successfully, but these errors were encountered: