emberjs-decorators
This addon adds useful mixin decorators for Ember applications.
Installation
ember install emberjs-decorators
Usage
Application Usage
In your application where you would normally have:
import Component from '@ember/component';
import MyMixin1 from '../mixins/my-mixin-one';
import MyMixin2 from '../mixins/my-mixin-two';
export default Component.extend(MyMixin1, MyMixin2, {})
You replace it with this:
import Component from '@ember/component';
import { mixin } from 'emberjs-decorators/mixin';
import MyMixin1 from '../mixins/my-mixin-one';
import MyMixin2 from '../mixins/my-mixin-two';
@mixin([
MyMixin1,
MyMixin2
])
export default class extends Component {}
Contributing
Installation
git clone <repository-url>
cd emberjs-decorators
npm install
Linting
npm run lint:js
npm run lint:js -- --fix
Running tests
-
ember test
– Runs the test suite on the current Ember version -
ember test --server
– Runs the test suite in "watch mode" -
npm test
– Runsember try:each
to test your addon against multiple Ember versions
Running the dummy application
ember serve
- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
License
This project is licensed under the MIT License.