Skip to content

Commit

Permalink
wip: Reduce size of web dist/ #14
Browse files Browse the repository at this point in the history
  • Loading branch information
lo5 committed Jun 26, 2022
1 parent 8cba1a1 commit 5caaf2f
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 58 deletions.
1 change: 1 addition & 0 deletions wasm/py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build: purge ## Build everything
cp -R ../../web/build/ . && \
cp web/build/nitride.js build/. && \
cd build && \
rm -f image.png sample.jpg && \
zip -r ../dist/nitride-v$(VERSION).zip *

purge: ## Purge previous build
Expand Down
Binary file removed web/public/android-chrome-192x192.png
Binary file not shown.
Binary file removed web/public/apple-touch-icon.png
Binary file not shown.
Binary file removed web/public/busy64.gif
Binary file not shown.
Binary file removed web/public/favicon-16x16.png
Binary file not shown.
Binary file removed web/public/favicon-32x32.png
Binary file not shown.
33 changes: 1 addition & 32 deletions web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,19 @@
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="192x192" href="%PUBLIC_URL%/android-chrome-192x192.png">
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/apple-touch-icon.png">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />


<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400&family=Roboto+Slab:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"
rel="stylesheet">
<link href="%PUBLIC_URL%/styles.css" rel="stylesheet">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Nitro</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="nitro" data-endpoint="/nitro"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>

</html>
25 changes: 0 additions & 25 deletions web/public/manifest.json

This file was deleted.

3 changes: 2 additions & 1 deletion web/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { installPlugins } from './plugin';
import { Box, Edit, EditPosition, EditType, Message, MessageType, Server, ServerEvent, ServerEventT } from './protocol';
import { defaultScheme, Scheme } from './theme';
import { make, newClientContext } from './ui';
import loadingAnimation from './loading.gif'

enum AppStateT { Connecting, Disconnected, Invalid, Connected }

Expand Down Expand Up @@ -77,7 +78,7 @@ const Busy = make(({ timeout }: { timeout: U }) => {
visibleB = signal(false),
render = () => (
<Blocker style={{ opacity: visibleB() ? 0.5 : 0 }}>
<img alt='Busy' src="busy32.gif" />
<img alt='Busy' src={loadingAnimation} />
</Blocker>
)

Expand Down
File renamed without changes

0 comments on commit 5caaf2f

Please sign in to comment.