npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

puship-plugin

v2.1.0

Published

Plugin for register device on Puship service notification

Readme

Puship Notifications Plugin for Android and iOS


DESCRIPTION

This plugin is for use with Puship.com, it's quickly enable support for Push Notifications on cordova and phonegap applications.

Is based on cordova-plugin-push, So, you can use all his methods for manage the push notifications. It and add only few resources for manage remote push notifications on Puship server(s):

  1. one javascript library
  2. many sounds
  3. plugin dependencies: - cordova-plugin-device - cordova-plugin-geolocation - cordova-plugin-push

Important - Push notifications are intended for real devices. The registration process will fail on the iOS simulator. Notifications can be made to work on the Android Emulator, however doing so requires installation of some helper libraries.

Installation

Normally it is sufficient to add the plugin as indicated below, but if you have special needs you can first manually install the cordova-plugin-push and configure it as spelled at the following link, and then resume from here. Since the cordova-plugin-push is already installed it will not be installed again.

Cordova

The plugin can be installed via the Cordova command line interface:

  1. Navigate to the root folder for your cordova project. 2) Run the command.
cordova plugin add https://github.com/Puship/PushPlugin.git

Phonegap

The plugin can be installed using the Phonegap command line interface:

  1. Navigate to the root folder for your phonegap project. 2) Run the command.
phonegap local plugin add https://github.com/Puship/PushPlugin.git

Plugman

The plugin is based on plugman and can be installed using the Plugman command line interface:

plugman install --platform [PLATFORM] --project [TARGET-PATH] --plugin [PLUGIN-PATH]

where
	[PLATFORM] = ios or android
	[TARGET-PATH] = path to folder containing your phonegap project
	[PLUGIN-PATH] = path to folder containing this plugin

How to activate

Go to Puship.com and create your Free account. Configure your application from dashboard an then add highlighted code to your index.js:

#	function onDeviceReady() {
#        this.receivedEvent('deviceready');
#		
#		push = PushNotification.init({
#			android: {
#			},
#			browser: {
#				pushServiceURL: 'http://push.api.phonegap.com/v1/push'
#			},
#			ios: {
#				alert: "true",
#				badge: "true",
#				sound: "true"
#			},
#			windows: {}
#		});
#		
#		push.on('registration', (data) => {
+			var appCode = "YOUR-PUSHIP-APP-CODE"; // I.E.: puship_id = "h1mCVGaP9dtGnwG"
+			Puship.Register(data.registrationId, appCode);
#		});
#
#		push.on('notification', (data) => {
+			alert(JSON.stringify(data));
#			// data.message,
#			// data.title,
#			// data.count,
#			// data.sound,
#			// data.image,
#			// data.additionalData
#		});
#
#		push.on('error', (e) => {
#			alert(e.message);
#		});
#		
#		document.getElementById('deviceready').classList.add('ready');
#		console.log('Running cordova-' + cordova.platformId + '@' + cordova.version);
#    }

Then run your app and start send push notifications!

...and yes, this is lovely all!

Other tips

  1. at this link you can find a complete example that use all library methods
  2. a this link you can find official library documentation