emberjs / ember.js

Ember.js - A JavaScript framework for creating ambitious web applications
https://emberjs.com
MIT License
22.47k stars 4.21k forks source link

[Bug] "ember d component-class" incorrectly removes app export #20029

Open Timbuktu1982 opened 2 years ago

Timbuktu1982 commented 2 years ago

Call of "ember d component-class" removes not only the component-controller, its incorrectly removes the app export file.

locks commented 2 years ago

Hi @Timbuktu1982, I'm not sure I understand what you mean by "removes the app export file"?

Timbuktu1982 commented 2 years ago

Hi @Timbuktu1982, I'm not sure I understand what you mean by "removes the app export file"?

Hi locks, sorry, two important information i have forgot: I mean this for addon usage and with component-controller i mean the component-class in addon-folder. When i want to remove only the component controller from a specific component, the blueprint to delete this component controller removes the also needed file in app folder.

Example: You can create a new component with component-class like using "ember g component componentName --with-component-class". Normally after using this command it have been generated 3 files:

Now i want to remove the component class. So i can use the blueprint "ember d component-class componentName". Normally the blueprint have to remove "addon/components/componentName.js" only. But the blueprint removes "app/components/componentName.js" also, so the component has after that no more export-file and the "addon/components/componentName.hbs" is not available.