A Flight component for setting the component defaultAttrs from the attached element data attributes.
bower install --save flight-data-attributes
<div class="tweet" data-user-id="1" data-tweet-id="2" data-screen-name="John"></div>
var withDataAttributes = require('path/to/with_data_attributes');
var MyComponent = defineComponent(withDataAttributes);
MyComponent.attachTo(".tweet");
So now we have all these data attributes set in the component.
this.attr.userId == 1
this.attr.tweetId == 2
this.attr.screenName == "John"
Development of this component requires Bower to be globally installed:
npm install -g bower
Then install the Node.js and client-side dependencies by running the following commands in the repo's root directory.
npm install & bower install
To continuously run the tests in Chrome during development, just run:
npm run watch-test
Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.