Naughty Pinching Mannequins
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

ember-cli-pushjs

2.0.6 • Public • Published

Ember Observer Score Build Status Coverage Status NPM Version NPM Downloads Dependency Status DevDependency Status Greenkeeper

ember-cli-pushjs

Simple Wrapper around Push JS. This provides a service that can be used to send system / web notifications

DEMO

Installation

ember install ember-cli-pushjs

Usage

import Route from '@ember/routing/route';
 
import { inject } from '@ember/service';
 
export default Route.extend({
  push: inject(),
 
  setupController(controller) {
    this._super(...arguments);
    controller.setProperties({
      timeout: 5000,
      title: 'Test Notification',
      body: 'How does it feel for this to be so easy?',
      icon: 'https://lh5.ggpht.com/ZHrKRvpiLuDpAzK55_VJUXf0g22TM_jHWb5fMG1GUSnt6NtFVoxzlDvqjbi_f7005dU=w300'
    })
  },
 
  actions: {
    notify() {
      let { title, body, icon, timeout } = this.get('controller');
      this.get('push').create(title, {
        body, icon, timeout
      })
    }
  }
});

Contributing

Installation

  • git clone <repository-url>
  • cd ember-cli-pushjs
  • yarn install

Linting

  • yarn lint:js
  • yarn 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"
  • yarn test – Runs ember try:each to test your addon against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.

install

npm i ember-cli-pushjs

Downloadsweekly downloads

35

version

2.0.6

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability