Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSC Experiment Omnibus #43

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(app): Introduce Vite
  • Loading branch information
kriskowal committed Dec 6, 2022
commit 24d14c9f323adace373d6d5b4c32694c67fa6a14
2 changes: 1 addition & 1 deletion packages/app/build.js
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ async function main() {
ext = 'icns';
}

await cp('index.html', target);
await sh(source, 'yarn', 'run', 'vite', 'build', '--outDir', target, '--base', './');
await cp(`../../art/gen/icon.${ext}`, target); // app icon
}

28 changes: 28 additions & 0 deletions packages/app/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
* {
box-sizing: border-box;
}

html {
font-family: Lucida Grande, sans-serif;
height: 100%;
}

@media (prefers-color-scheme: dark) {
html {
background-color: #222222;
}
}

body {
margin: 0;
padding: 4px;
padding-top: 0;
height: 100%;
}

#root {
height: 100%;
width: 100%;
padding: 2px;
}

4 changes: 3 additions & 1 deletion packages/app/index.html
Original file line number Diff line number Diff line change
@@ -2,11 +2,13 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/endo.svg">
<link rel="icon" type="image/svg+xml" href="endo.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="index.css">
<title>Endo</title>
</head>
<body>
<div id="root"></div>
<script type="module">

window.parent.setTitle('Endo');
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@
"lint:types": "tsc -p jsconfig.json",
"test": "exit 0"
},
"dependencies": {},
"devDependencies": {
"@endo/eslint-config": "^0.3.6",
"ava": "^3.12.1",
@@ -37,7 +36,8 @@
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-prettier": "^3.4.1",
"prettier": "^1.19.1",
"typescript": "~4.8.4"
"typescript": "~4.8.4",
"vite": "^3.2.3"
},
"files": [],
"eslintConfig": {
6 changes: 6 additions & 0 deletions packages/app/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from 'vite';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
});