sbmaxx / bem-priv

Use the power of inherit.js to generate BEMJSON with BEMPRIV blocks
21 stars 6 forks source link

Add custom properties setters #6

Closed DimitryDushkin closed 10 years ago

DimitryDushkin commented 10 years ago

We need this BEMJSON:

{  
   block: 'one',
   title: 'we need custom props'
}

Code:

BEMPRIV.decl('one', {
    init: function() {
        this._property('title', undefined, 'we need custom props');
    }
});

It would be great to write:

BEMPRIV.decl('one', {
    init: function() {
        this.title('we need custom props');
    }
});
sbmaxx commented 10 years ago

Fixed in https://github.com/sbmaxx/bempriv/tree/0.0.6