- Fix error in bundle when node failed on
window
ref #49
- Compatible with React 16+
- Source code re-written with TypeScript. Added built-in typings.
- BREAKING CHANGE Exported top-level method
setup
, that returns new block factory - BREAKING CHANGE Removed method
reset
- BREAKING CHANGE Call chains like
b('element')({ color: 'red' })
not supported
- Bugfix: buggy mix with namespace #32
- Added
.babelrc
to.npmignore
- Bugfix: make
setup
andreset
methods truly static
- Exports
default
in Babel 5 style with babel-plugin-add-module-exports
- Source code was rewritten from scratch
- Block function trims given block name
- Block function throws exception if block name isn't a string or empty string
- Impossible to add several modifiers with the same name:
block('button')({skin: 'dark'})({skin: 'light'}); // "button_skin_light"
- Method
mix
doesn't support objects - Implemented static method
block.reset()
- Implemented new state-methods
is()
andhas()
- Class mapping support
- Added ability to specify name/value separator for modifier
- Bugfix: incorrect states for non boolean values in given object
- Namespace available for setup in general settings
- Method
mix()
supports another blocks
- Breaking change for usage in browser: entry point
Block
renamed toblock
- Method
mix
supports arrays and object
First stable release.
- Generates block's name
- Generates element's name
- Adds modifiers with or without value
- Mixes another class name
- Supports SMACSS states
- Supports custom separators