Narcissistic Pickle Meister

    gridsome-plugin-pwa

    0.0.21 • Public • Published

    gridsome logo

    gridsome-plugin-pwa

    A PWA plugin for gridsome

    npm version npm npm bundle size

    Installation

    # For npm
    $ npm install gridsome-plugin-pwa
    # For yarn
    $ yarn add gridsome-plugin-pwa
    

    Usage

    Add gridsome-plugin-pwa to plugin array with following configurable options to gridsome.config.js

    Defaults for required fields and example for optional fields values are mentioned below along side properties

    ...
    plugins:[
        {
            use: 'gridsome-plugin-pwa',
            options: {
                // Service Worker Options
                disableServiceWorker: false,
                serviceWorkerPath: 'service-worker.js',
                cachedFileTypes: 'js,json,css,html,png,jpg,jpeg,svg,gif',
                disableTemplatedUrls: false,       // Optional
    
                // Manifest Options (https://developer.mozilla.org/en-US/docs/Web/Manifest)
                manifestPath: 'manifest.json',
                title: 'Gridsome',
                startUrl: '/',
                display: 'standalone',
                statusBarStyle: 'default',
                themeColor: '#666600',
                backgroundColor: '#ffffff',
                icon: '',
                shortName: 'Gridsome',              // Optional
                description: 'Gridsome is awesome!',// Optional
                categories: ['education'],          // Optional
                lang: 'en-GB',                      // Optional
                dir: 'auto',                        // Optional
                maskableIcon: true,                 // Optional
                screenshots: [                      // Optional
                    {
                        src: 'src/screenshot1.png',
                        sizes: '1280x720',
                        type: 'image/png',
                    },
                ],
                shortcuts: [                        // Optional
                    {
                        name: "View Subscriptions",
                        short_name: "Subscriptions",
                        description: "View the list of podcasts you listen to",
                        url: "/subscriptions?utm_source=homescreen",
                        icons: [{ src: "/icons/subscriptions.png", sizes: "192x192" }]
                    }
                ],
                gcmSenderId: undefined,             // Optional
    
                // Standard Meta Tags
                svgFavicon: 'favicon.svg',          // Optional. Requires favicon.ico fallback
    
                // Microsoft Windows Meta Tags
                msTileColor: '#666600',             // Optional
    
                // Apple MacOS Meta Tags
                appleMaskIcon: 'favicon.svg',       // Optional
                appleMaskIconColor: '#666600',      // Optional
            }
        }
    ]

    License (MIT)

    Open LICENSE file for more info

    Install

    npm i gridsome-plugin-pwa

    DownloadsWeekly Downloads

    369

    Version

    0.0.21

    License

    MIT

    Unpacked Size

    14.4 kB

    Total Files

    12

    Last publish

    Collaborators

    • rishabh3112