19 lines
607 B
JavaScript
19 lines
607 B
JavaScript
const path = require('path')
|
|
const pwa_manifest = require('@pwa/manifest')
|
|
const chalk = require('chalk')
|
|
const log = console.log;
|
|
|
|
module.exports = async config => {
|
|
log(' ', chalk.green('>>'), 'Generating pwa manifest')
|
|
const manifest = await pwa_manifest({
|
|
name: 'asciidisco.com',
|
|
short_name: 'asciidisco.com Blog',
|
|
start_url: '/index.html',
|
|
display: 'standalone',
|
|
background_color: '#212121',
|
|
theme_color: '#212121'
|
|
})
|
|
log(' ', chalk.green('>>'), 'Writing pwa manifest')
|
|
pwa_manifest.write(path.join(config.basepath, config.dist_path), manifest)
|
|
return {}
|
|
} |