elegantapp / pwa-asset-generator

Automates PWA asset generation and image declaration. Automatically generates icon and splash screen images, favicons and mstile images. Updates manifest.json and index.html files with the generated images according to Web App Manifest specs and Apple Human Interface guidelines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to get the file manifest.json

component6 opened this issue · comments

package.json

{
  "dependencies": {
    "pwa-asset-generator": "^6.0.1",
  }
}

index.js
const pwa = require('pwa-asset-generator');

const img = 'abcd.jpg';

(async () => {
  const { savedImages, htmlMeta, manifestJsonContent } =
    await pwa.generateImages(img, './temp/', {
      scrape: false,
      background: 'linear-gradient(to right, #fa709a 0%, #fee140 100%)',
      splashOnly: true,
      portraitOnly: true,
      log: false,
      //
      manifest: './temp/manifest.json',  // the file is not generated 
    });
})();

I run the file in the console
node index.js

I want the file to be generated along with the images:

  • images are generated
  • the file is not generated

Hi @component6, thanks for your feedback. pwa-asset-generator is an image generation tool for pwa development and it expect there being a manifest.json file in your project already. It's not the library's purpose to transform a web app to a pwa, create a manifest file or create a package for the app. If you're looking for a solution related to that, I recommend checking out pwa-builder.