From e7d6d31a3aa56bd99c751ea9506490fc7d04241d Mon Sep 17 00:00:00 2001 From: Nikola Boychev Date: Thu, 11 Oct 2018 23:52:50 +0300 Subject: [PATCH] Use CRA compatible constants --- package.json | 2 +- src/constants/index.js | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 0823802..b76347a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron-push-receiver", - "version": "2.1.1", + "version": "2.1.2", "description": "A module to receive FCM notifications in electron", "main": "src/index.js", "repository": "https://github.com/MatthieuLemoine/electron-push-receiver", diff --git a/src/constants/index.js b/src/constants/index.js index c53af88..899ae04 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -1,18 +1,12 @@ -// Event to be sent from renderer process to trigger service start -const START_NOTIFICATION_SERVICE = 'PUSH_RECEIVER:::START_NOTIFICATION_SERVICE'; -// Event sent to the renderer process once the service is up -const NOTIFICATION_SERVICE_STARTED = 'PUSH_RECEIVER:::NOTIFICATION_SERVICE_STARTED'; -// Event sent to the renderer process if an error has occured during the starting process -const NOTIFICATION_SERVICE_ERROR = 'PUSH_RECEIVER:::NOTIFICATION_SERVICE_ERROR'; -// Event sent to the renderer processs when a notification has been received -const NOTIFICATION_RECEIVED = 'PUSH_RECEIVER:::NOTIFICATION_RECEIVED'; -// Event sent to the renderer processs when the FCM token has been updated -const TOKEN_UPDATED = 'PUSH_RECEIVER:::TOKEN_UPDATED'; - module.exports = { - START_NOTIFICATION_SERVICE, - NOTIFICATION_SERVICE_STARTED, - NOTIFICATION_SERVICE_ERROR, - NOTIFICATION_RECEIVED, - TOKEN_UPDATED, + // Event to be sent from renderer process to trigger service start + START_NOTIFICATION_SERVICE: 'PUSH_RECEIVER:::START_NOTIFICATION_SERVICE', + // Event sent to the renderer process once the service is up + NOTIFICATION_SERVICE_STARTED: 'PUSH_RECEIVER:::NOTIFICATION_SERVICE_STARTED', + // Event sent to the renderer process if an error has occured during the starting process + NOTIFICATION_SERVICE_ERROR: 'PUSH_RECEIVER:::NOTIFICATION_SERVICE_ERROR', + // Event sent to the renderer processs when a notification has been received + NOTIFICATION_RECEIVED: 'PUSH_RECEIVER:::NOTIFICATION_RECEIVED', + // Event sent to the renderer processs when the FCM token has been updated + TOKEN_UPDATED: 'PUSH_RECEIVER:::TOKEN_UPDATED', };