diff --git a/esbuildconf.js b/esbuildconf.js index 7da29f3..8062f34 100644 --- a/esbuildconf.js +++ b/esbuildconf.js @@ -8,19 +8,22 @@ import { replaceOnCopyPlugin } from './tools/esbuild-helper.js' // see docs at https://esbuild.github.io/api/ export const options = { entryPoints: [ - 'src/main.js', - 'src/main.css', - 'src/index.html', 'src/about.html', 'src/assets/comment.svg', 'src/assets/heart-fill.svg', + 'src/assets/nostr-favicon.png', + 'src/assets/nostr-favicon.svg', 'src/assets/star.svg', 'src/assets/star-fill.svg', 'src/favicon.ico', + 'src/index.html', + 'src/main.css', + 'src/main.js', + 'src/manifest.json', ], outdir: 'dist', //entryNames: '[name]-[hash]', TODO: replace urls in index.html with hashed paths - loader: {'.html': 'copy', '.svg': 'copy', '.ico': 'copy'}, + loader: {'.html': 'copy', '.ico': 'copy', '.png': 'copy', '.svg': 'copy'}, bundle: true, platform: 'browser', minify: false, // TODO: true for release and enable sourcemap @@ -36,6 +39,7 @@ export const options = { }), NodeGlobalsPolyfillPlugin({buffer: true}), replaceOnCopyPlugin(/about\.html$/), + replaceOnCopyPlugin(/manifest\.json$/), ] }; diff --git a/src/about.html b/src/about.html index 64d4e9e..869f122 100644 --- a/src/about.html +++ b/src/about.html @@ -5,6 +5,7 @@ about / nostr +
diff --git a/src/assets/nostr-favicon.png b/src/assets/nostr-favicon.png new file mode 100644 index 0000000..54addae Binary files /dev/null and b/src/assets/nostr-favicon.png differ diff --git a/src/assets/nostr-favicon.svg b/src/assets/nostr-favicon.svg new file mode 100644 index 0000000..0f406bf --- /dev/null +++ b/src/assets/nostr-favicon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/index.html b/src/index.html index 2781169..ca800a5 100644 --- a/src/index.html +++ b/src/index.html @@ -5,6 +5,7 @@ nostr +
diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 0000000..d0a3d8a --- /dev/null +++ b/src/manifest.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/web-manifest-combined.json", + "background_color": "#191919", + "categories": ["news", "social"], + "description": "a nostr news client to connect with the world.", + "display": "fullscreen", + "name": "nostr", + "short_name": "nostr", + "start_url": "https://nostr.ch/", + "icons": [{ + "src": "assets/nostr-favicon.png", + "sizes": "256x256", + "type": "image/png" + }, { + "src": "favicon.ico", + "sizes": "32x32" + }, { + "src": "assets/nostr-favicon.svg", + "sizes": "any" + }] +}