BEM helpers for Ember.js applications
HEALTH ? 90 / Healthy
BEM helpers for Ember.js applications
// readme
This addon provides BEM helpers for Ember.js applications.
This addon produces BEM classes based on Two Dashes style.
No mixins, no code in the component js/ts file needed. Works with template-only components.
ember install ember-bem-helpers
If you’re using this addon within a V2 addon (not a classic Ember app), you need to manually configure the AST transform in your addon’s babel.publish.config.cjs and/or babel.config.cjs:
module.exports = {
plugins: [
[
'babel-plugin-ember-template-compilation',
{
targetFormat: 'hbs',
transforms: [
'ember-bem-helpers/ast-transform',
// ... other transforms
],
},
],
// ... other plugins
]
}
This is necessary because v2 addons are pre-built, so the AST transformation needs to happen during the addon’s own build process, not in the consuming app.
Note: Classic Ember apps and Embroider apps…