Skip to content

Commit

Permalink
fix(meta): generate only on build
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Nov 16, 2017
1 parent 9d68d70 commit 1cace26
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/meta/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
const debug = require('debug')('nuxt:pwa:meta')

const find = (arr, key, val) => arr.find(obj => val ? obj[key] === val : obj[key])

module.exports = function nuxtMeta (_options) {
this.nuxt.plugin('build', builder => {
debug('Generating meta')
generateMeta.call(this, _options)
})
}

function generateMeta (_options) {
// Defaults
const defaults = {
name: process.env.npm_package_name,
Expand Down

0 comments on commit 1cace26

Please sign in to comment.