Skip to content

Commit

Permalink
feat: remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya parsa committed Feb 4, 2019
1 parent 0b69bac commit 92ba73e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions packages/icon/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
const { existsSync } = require('fs-extra')
const path = require('path')
const Jimp = require('jimp')
const debug = require('debug')('nuxt:pwa')

const fixUrl = url => url.replace(/\/\//g, '/').replace(':/', '://')
const isUrl = url => url.indexOf('http') === 0 || url.indexOf('//') === 0

module.exports = function nuxtIcon (options) {
const hook = () => {
debug('Adding icons')
return generateIcons.call(this, options)
}

Expand Down Expand Up @@ -43,7 +41,6 @@ function generateIcons (moduleOptions) {
// Ensure icon file exists
if (!existsSync(iconSrc)) {
/* eslint-disable no-console */
debug(path.relative(this.options.srcDir, iconSrc), 'not found! Please create one or disable icon module.')
return
}

Expand Down
2 changes: 0 additions & 2 deletions packages/manifest/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
const hash = require('hash-sum')
const debug = require('debug')('nuxt:pwa')

const fixUrl = url => url.replace(/\/\//g, '/').replace(':/', '://')
const isUrl = url => url.indexOf('http') === 0 || url.indexOf('//') === 0
const find = (arr, key, val) => arr.find(obj => val ? obj[key] === val : obj[key])

module.exports = function nuxtManifest (options) {
const hook = () => {
debug('Adding manifest')
addManifest.call(this, options)
}

Expand Down
5 changes: 0 additions & 5 deletions packages/meta/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
const debug = require('debug')('nuxt:pwa')

const find = (arr, key, val) => arr.find(obj => val ? obj[key] === val : obj[key])
const isUrl = url => url.indexOf('http') === 0 || url.indexOf('//') === 0

module.exports = function nuxtMeta (_options) {
const hook = () => {
debug('Adding meta')
generateMeta.call(this, _options)
}

Expand Down Expand Up @@ -212,8 +209,6 @@ function generateMeta (_options) {
content: options.ogImage.type
})
}
} else {
debug('No host specified, skipping og:image')
}
}

Expand Down
8 changes: 0 additions & 8 deletions packages/onesignal/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const path = require('path')
const { writeFileSync, readFileSync } = require('fs')
const hashSum = require('hash-sum')
const debug = require('debug')('nuxt:pwa')
const { defaultsDeep } = require('lodash')

const fixUrl = url => url.replace(/\/\//g, '/').replace(':/', '://')
Expand All @@ -13,7 +12,6 @@ const isUrl = url => url.indexOf('http') === 0 || url.indexOf('//') === 0

module.exports = function nuxtOneSignal (moduleOptions) {
const hook = () => {
debug('Adding OneSignal')
addOneSignal.call(this, moduleOptions)
}

Expand Down Expand Up @@ -92,18 +90,12 @@ function addOneSignal (moduleOptions) {
if (!this.options.manifest) {
this.options.manifest = {}
}
if (this.options.manifest.gcm_sender_id) {
debug('WARNING: Overriding gcm_sender_id for OnSignal')
}
this.options.manifest.gcm_sender_id = options.GcmSenderId

// Adjust swURL option of Workbox for oneSignal
if (!this.options.workbox) {
this.options.workbox = {}
}
if (this.options.workbox.swURL) {
debug('WARNING: Overriding swURL for OneSignal')
}
this.options.workbox.swURL = 'OneSignalSDKWorker.js'

// Provide OneSignalSDKWorker.js and OneSignalSDKUpdaterWorker.js
Expand Down

0 comments on commit 92ba73e

Please sign in to comment.