Include rison
in an ember-cli app.
This addon uses rison-node as its NPM rison dependency.
Ships with the following computed property macros: risonEncode
, risonDecode
.
import Component from '@ember/component';
import risonEncode from 'ember-cli-rison/computeds/rison-encode';
export default Component.extend({
encoded: risonEncode('value')
});
import Component from '@ember/component';
import { risonEncode } from 'ember-cli-rison/helpers/rison-encode';
import { risonDecode, safeRisonDecode } from 'ember-cli-rison/helpers/rison-decode';
export default Component.extend({
didReceiveAttrs() {
this._super(...arguments);
this.set('decoded', safeRisonDecode(this.get('encoded')));
},
actions: {
update(value) {
this.get('update')(risonEncode(value));
}
}
});
This addon provides the ability to import rison as an ES6 module.
import rison from 'rison';
-
git clone <repository-url>
this repository cd ember-cli-rison
npm install
ember serve
- Visit your app at http://localhost:4200.
-
npm test
(Runsember try:each
to test your addon against multiple Ember versions) ember test
ember test --server
ember build
For more information on using ember-cli, visit http://ember-cli.com/.