Converts regular Ember.js components to tagName: ''
components
This codemod is experimental and might break your app. Make sure to review the changes that it creates!
npx tagless-ember-components-codemod
import Component from '@ember/component';
export default Component.extend({
tagName: 'button',
attributeBindings: ['disabled', 'disabled:aria-disabled'],
classNames: ['custom-button'],
classNameBindings: ['blue:blue:red'],
});
will be migrated to:
import Component from '@ember/component';
export default Component.extend({
tagName: '',
});
-
Due to the way
jscodeshift
works it sometimes removes empty lines between component properties, or adds new ones unexpectedly -
Since
click()
and other event hooks don't work for tagless components, passing in something like@click=(action ...)
also will not work anymore
This projects is released under the MIT License.