bemmed

JavaScript class to compose reusable objects that result in a `block__element--modifier` string.

MIT License

Downloads
20
Stars
2

Bot releases are hidden (Show)

bemmed - 1.6.2 Latest Release

Published by frontendr 3 months ago

What's Changed

  • Fixed an issue that was breaking exports in ESM builds #161

Full Changelog: https://github.com/frontendr/bemmed/compare/1.6.1...1.6.2

bemmed - 1.6.0

Published by frontendr over 1 year ago

1.6.0

  • BREAKING CHANGE: The propTypes property is no longer available on the BEM object. You can import it directly from bemmed/proptypes in order to keep the bundle size as small as possible.
bemmed - 1.5.0

Published by frontendr over 1 year ago

Release 1.5.0

  • Refactored the codebase into Typescript.
  • Types are now much more accurate as they are auto-generated now by Typescript.
  • Cleaned up development packages.
  • Added a .s getter for cleaner and easier .toString() calls on BEM and BEMList instances.
bemmed - 1.4.0

Published by frontendr over 1 year ago

Release 1.4.0

  • Changed build method to use rollup.js
  • Bemmed is now distributed in CommonJS, ES, and UMD formats.
  • Typings are now in the types subfolder and are properly referenced in package.json
bemmed - 1.2.0

Published by frontendr over 3 years ago

Release 1.2.0

Refactored BEM.propType into a BEM.propTypes object with multiple propTypes functions.

The propTypes all have a isRequired property to ensure the prop has a value.

  • BEM.propTypes.bem: New propType to check for BEM instances.
  • BEM.propTypes.className: PropType to check if a prop is a valid className (including BEM objects). This was the original BEM.propType which is still present but deprecated.
  • BEM.propTypes.element: PropType to check if a prop can be used as a value for BEM.element().
  • BEM.propTypes.modifier: PropType to check if a prop can be used as a value for BEM.modifier().

Deprecations

  • BEM.propType is deprecated in favor of BEM.propTypes.className.
  • The BEMTypes export is also deprecated. It wasn't documented so doubt anyone uses it anyway.
bemmed - 1.3.0

Published by frontendr over 3 years ago

Release 1.3.0

  • Make the behaviour of BEMList.concat() the same as BEM.concat(). Both remove any duplicate arguments.
  • Updates on the documentation.
bemmed - 1.2.1

Published by frontendr over 3 years ago

Release 1.2.1

  • A fix for possible 'leakage' of modifiers when using .elements().
  • devDependency updates
  • Prettier 2 code style
  • Less comments in build