New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nuxtjs/manifest

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxtjs/manifest - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="1.1.0"></a>
# [1.1.0](https://github.com/nuxt/modules/compare/@nuxtjs/manifest@1.0.1...@nuxtjs/manifest@1.1.0) (2017-05-30)
### Features
* **manifest:** Use loading as theme color as default ([cae4329](https://github.com/nuxt/modules/commit/cae4329))
<a name="1.0.1"></a>

@@ -8,0 +19,0 @@ ## [1.0.1](https://github.com/nuxt/modules/compare/@nuxtjs/manifest@1.0.0...@nuxtjs/manifest@1.0.1) (2017-05-29)

22

index.js

@@ -1,4 +0,5 @@

const fs = require('fs')
const fs = require('fs-extra')
const path = require('path')
const _ = require('lodash')
const hash = require('hash-sum')

@@ -20,3 +21,3 @@ // https://developer.mozilla.org/en-US/docs/Web/Manifest

src: 'icon.png',
sizes: '192x192',
sizes: '512x512',
type: 'image/png'

@@ -28,10 +29,11 @@ }

background_color: '#ffffff',
theme_color: '#3f51b5'
theme_color: (this.options.loading && this.options.loading.color) || '#3f51b5'
}
// Write manifest.json
// TODO: write into .nuxt/dist instead
const manifest = _.defaultsDeep({}, this.options.manifest, defaults)
const manifestFileName = 'manifest.json'
const manifestFilePath = path.resolve(this.options.rootDir, 'static', manifestFileName)
const manifestFileName = `manifest.${hash(manifest)}.json`
const distDir = 'static' //this.options.dev ? 'static' : '.nuxt/dist'
const manifestFilePath = path.resolve(this.options.rootDir, distDir, manifestFileName)
fs.ensureDirSync(path.resolve(this.options.rootDir, distDir))
fs.writeFileSync(manifestFilePath, JSON.stringify(manifest), 'utf8')

@@ -41,3 +43,4 @@

if (!_.find(this.options.head.link, {rel: 'manifest'})) {
this.options.head.link.push({rel: 'manifest', href: '/' + manifestFileName})
const manifestURL = `/${manifestFileName}` //(this.options.dev ? '/' : this.options.build.publicPath ) + manifestFileName
this.options.head.link.push({rel: 'manifest', href: manifestURL})
}

@@ -59,4 +62,9 @@

}
// Add theme-color meta
if (manifest.description && !_.find(this.options.head.meta, {name: 'theme-color'})) {
this.options.head.meta.push({name: 'theme-color', content: manifest.theme_color})
}
}
module.exports.meta = require('./package.json')
{
"name": "@nuxtjs/manifest",
"version": "1.0.1",
"version": "1.1.0",
"license": "MIT",

@@ -12,4 +12,6 @@ "main": "index.js",

"dependencies": {
"fs-extra": "^3.0.1",
"hash-sum": "^1.0.2",
"lodash": "^4.17.4"
}
}

@@ -27,1 +27,2 @@ # Manifest

```
- Add `static/manifest.*.json` to `.gitignore` file.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc