Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
a145789 committed Jul 13, 2024
0 parents commit 77cee76
Show file tree
Hide file tree
Showing 36 changed files with 5,873 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Tauri + Vanilla TS

This template should help get you started developing with Tauri in vanilla HTML, CSS and Typescript.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
33 changes: 33 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"ignore": ["./src-tauri/**/*", "node_modules"],
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "warn"
},
"suspicious": {
"noExplicitAny": "warn"
}
}
},
"formatter": {
"indentStyle": "space",
"ignore": ["./src-tauri/**/*", "node_modules"]
},
"javascript": {
"formatter": {
"semicolons": "asNeeded"
}
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
}
}
57 changes: 57 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri App</title>
<script type="module" src="/src/main.ts" defer></script>

<style>
html,
body {
margin: 0;
height: 100%;
width: 100%;
border-radius: 14px;
box-sizing: border-box;
background-image: url(./src/assets/bg.png);
color: #d6e4f7;
cursor: move;
}

body {
padding: 10px;
}

.container {
width: 100%;
height: 100%;
font-size: 14px;
display: flex;
flex-direction: column;
justify-content: space-around;
}

#sys-info span:first-child {
font-weight: bold;
}
</style>
</head>

<body>
<div class="container">
<div id="sys-info">
<span>CPU:</span>
<span id="cpu-usage"></span>
</div>
<div id="sys-info">
<span>内存:</span>
<span id="memory-usage"></span>
</div>
<div id="sys-info">
<span>网速:</span>
<span id="network-usage"></span>
</div>
</div>
</body>
</html>
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "sys-speed",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri",
"lint": "biome check --write src"
},
"dependencies": {
"@tauri-apps/api": "^1"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@tauri-apps/cli": "^1",
"typescript": "^5.2.2",
"vite": "^5.3.1"
}
}
Loading

0 comments on commit 77cee76

Please sign in to comment.