add index html shell

This commit is contained in:
Paul Miller
2023-11-01 12:22:43 -05:00
committed by Tony Giorgio
parent 8e19533e7e
commit 918698680d
5 changed files with 56 additions and 22 deletions

View File

@@ -13,8 +13,8 @@ dependencies {
implementation project(':capacitor-browser')
implementation project(':capacitor-clipboard')
implementation project(':capacitor-filesystem')
implementation project(':capacitor-share')
implementation project(':capacitor-haptics')
implementation project(':capacitor-share')
implementation project(':capacitor-toast')
implementation project(':mutinywallet-barcode-scanner')

View File

@@ -14,12 +14,12 @@ project(':capacitor-clipboard').projectDir = new File('../node_modules/.pnpm/@ca
include ':capacitor-filesystem'
project(':capacitor-filesystem').projectDir = new File('../node_modules/.pnpm/@capacitor+filesystem@5.1.4_@capacitor+core@5.2.2/node_modules/@capacitor/filesystem/android')
include ':capacitor-share'
project(':capacitor-share').projectDir = new File('../node_modules/.pnpm/@capacitor+share@5.0.6_@capacitor+core@5.2.2/node_modules/@capacitor/share/android')
include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../node_modules/.pnpm/@capacitor+haptics@5.0.6_@capacitor+core@5.2.2/node_modules/@capacitor/haptics/android')
include ':capacitor-share'
project(':capacitor-share').projectDir = new File('../node_modules/.pnpm/@capacitor+share@5.0.6_@capacitor+core@5.2.2/node_modules/@capacitor/share/android')
include ':capacitor-toast'
project(':capacitor-toast').projectDir = new File('../node_modules/.pnpm/@capacitor+toast@5.0.6_@capacitor+core@5.2.2/node_modules/@capacitor/toast/android')

51
index.html Normal file
View File

@@ -0,0 +1,51 @@
<!doctype html>
<html>
<head>
<title>Mutiny Wallet</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0 height=device-height viewport-fit=cover user-scalable=no"
/>
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="theme-color" content="#171717" />
<meta
name="description"
content="Mutiny is a self-custodial lightning wallet that runs in the browser."
/>
<link rel="icon" href="/favicon.ico" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Mutiny Wallet" />
<meta
name="twitter:description"
content="Mutiny is a self-custodial lightning wallet that runs in the browser."
/>
<meta name="twitter:site" content="https://app.mutinywallet.com/" />
<meta
name="twitter:image"
content="https://app.mutinywallet.com/images/twitter_card_image.png"
/>
<meta property="og:type" content="website" />
<meta property="og:title" content="Mutiny Wallet" />
<meta
property="og:description"
content="Mutiny is a self-custodial lightning wallet that runs in the browser."
/>
<meta property="og:url" content="https://app.mutinywallet.com/" />
<meta
property="og:image"
content="https://app.mutinywallet.com/images/twitter_card_image.png"
/>
<link rel="apple-touch-icon" href="/images/icon.png" sizes="512x512" />
<link rel="mask-icon" href="/mutiny_logo_mask.svg" color="#000" />
<style>
html, body {
background-color: #171717;
}
</style>
</head>
<body>
<!---->
<script type="module" async src="./src/entry-client.tsx"></script>
</body>
</html>

View File

@@ -1,17 +0,0 @@
import { readFile, writeFile } from 'fs/promises';
import { join } from 'path';
const insertHeadTag = async () => {
const filePath = join(process.cwd(), 'dist', 'public', 'index.html');
try {
let data = await readFile(filePath, 'utf8');
const lines = data.split('\n');
lines.splice(2, 0, '<head></head>');
data = lines.join('\n');
await writeFile(filePath, data);
} catch (err) {
console.error(`Error: ${err}`);
}
};
insertHeadTag();

View File

@@ -6,7 +6,7 @@
"scripts": {
"dev": "solid-start dev",
"host": "solid-start dev --host",
"build": "solid-start build && node insertHead.js",
"build": "solid-start build",
"start": "solid-start start",
"check-types": "tsc --noemit",
"eslint": "eslint src",