Commit
·
15fd5c0
0
Parent(s):
add boilerplate
Browse files- README.md +28 -0
- index.html +13 -0
- package.json +19 -0
- public/vite.svg +1 -0
- src/App.css +27 -0
- src/App.tsx +35 -0
- src/assets/solid.svg +1 -0
- src/index.css +68 -0
- src/index.tsx +9 -0
- src/vite-env.d.ts +1 -0
- sugoi-v4-space/.gitignore +24 -0
- tsconfig.app.json +25 -0
- tsconfig.json +7 -0
- tsconfig.node.json +22 -0
- vite.config.ts +6 -0
README.md
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## Usage
|
2 |
+
|
3 |
+
```bash
|
4 |
+
$ npm install # or pnpm install or yarn install
|
5 |
+
```
|
6 |
+
|
7 |
+
### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)
|
8 |
+
|
9 |
+
## Available Scripts
|
10 |
+
|
11 |
+
In the project directory, you can run:
|
12 |
+
|
13 |
+
### `npm run dev`
|
14 |
+
|
15 |
+
Runs the app in the development mode.<br>
|
16 |
+
Open [http://localhost:5173](http://localhost:5173) to view it in the browser.
|
17 |
+
|
18 |
+
### `npm run build`
|
19 |
+
|
20 |
+
Builds the app for production to the `dist` folder.<br>
|
21 |
+
It correctly bundles Solid in production mode and optimizes the build for the best performance.
|
22 |
+
|
23 |
+
The build is minified and the filenames include the hashes.<br>
|
24 |
+
Your app is ready to be deployed!
|
25 |
+
|
26 |
+
## Deployment
|
27 |
+
|
28 |
+
Learn more about deploying your application with the [documentations](https://vitejs.dev/guide/static-deploy.html)
|
index.html
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!doctype html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7 |
+
<title>Vite + Solid + TS</title>
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
<div id="root"></div>
|
11 |
+
<script type="module" src="/src/index.tsx"></script>
|
12 |
+
</body>
|
13 |
+
</html>
|
package.json
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "sugoi-v4-space",
|
3 |
+
"private": true,
|
4 |
+
"version": "0.0.0",
|
5 |
+
"type": "module",
|
6 |
+
"scripts": {
|
7 |
+
"dev": "vite",
|
8 |
+
"build": "tsc -b && vite build",
|
9 |
+
"preview": "vite preview"
|
10 |
+
},
|
11 |
+
"dependencies": {
|
12 |
+
"solid-js": "^1.9.1"
|
13 |
+
},
|
14 |
+
"devDependencies": {
|
15 |
+
"typescript": "^5.5.3",
|
16 |
+
"vite": "^5.4.8",
|
17 |
+
"vite-plugin-solid": "^2.10.2"
|
18 |
+
}
|
19 |
+
}
|
public/vite.svg
ADDED
|
src/App.css
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#root {
|
2 |
+
max-width: 1280px;
|
3 |
+
margin: 0 auto;
|
4 |
+
padding: 2rem;
|
5 |
+
text-align: center;
|
6 |
+
}
|
7 |
+
|
8 |
+
.logo {
|
9 |
+
height: 6em;
|
10 |
+
padding: 1.5em;
|
11 |
+
will-change: filter;
|
12 |
+
transition: filter 300ms;
|
13 |
+
}
|
14 |
+
.logo:hover {
|
15 |
+
filter: drop-shadow(0 0 2em #646cffaa);
|
16 |
+
}
|
17 |
+
.logo.solid:hover {
|
18 |
+
filter: drop-shadow(0 0 2em #61dafbaa);
|
19 |
+
}
|
20 |
+
|
21 |
+
.card {
|
22 |
+
padding: 2em;
|
23 |
+
}
|
24 |
+
|
25 |
+
.read-the-docs {
|
26 |
+
color: #888;
|
27 |
+
}
|
src/App.tsx
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { createSignal } from 'solid-js'
|
2 |
+
import solidLogo from './assets/solid.svg'
|
3 |
+
import viteLogo from '/vite.svg'
|
4 |
+
import './App.css'
|
5 |
+
|
6 |
+
function App() {
|
7 |
+
const [count, setCount] = createSignal(0)
|
8 |
+
|
9 |
+
return (
|
10 |
+
<>
|
11 |
+
<div>
|
12 |
+
<a href="https://vitejs.dev" target="_blank">
|
13 |
+
<img src={viteLogo} class="logo" alt="Vite logo" />
|
14 |
+
</a>
|
15 |
+
<a href="https://solidjs.com" target="_blank">
|
16 |
+
<img src={solidLogo} class="logo solid" alt="Solid logo" />
|
17 |
+
</a>
|
18 |
+
</div>
|
19 |
+
<h1>Vite + Solid</h1>
|
20 |
+
<div class="card">
|
21 |
+
<button onClick={() => setCount((count) => count + 1)}>
|
22 |
+
count is {count()}
|
23 |
+
</button>
|
24 |
+
<p>
|
25 |
+
Edit <code>src/App.tsx</code> and save to test HMR
|
26 |
+
</p>
|
27 |
+
</div>
|
28 |
+
<p class="read-the-docs">
|
29 |
+
Click on the Vite and Solid logos to learn more
|
30 |
+
</p>
|
31 |
+
</>
|
32 |
+
)
|
33 |
+
}
|
34 |
+
|
35 |
+
export default App
|
src/assets/solid.svg
ADDED
|
src/index.css
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
:root {
|
2 |
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
3 |
+
line-height: 1.5;
|
4 |
+
font-weight: 400;
|
5 |
+
|
6 |
+
color-scheme: light dark;
|
7 |
+
color: rgba(255, 255, 255, 0.87);
|
8 |
+
background-color: #242424;
|
9 |
+
|
10 |
+
font-synthesis: none;
|
11 |
+
text-rendering: optimizeLegibility;
|
12 |
+
-webkit-font-smoothing: antialiased;
|
13 |
+
-moz-osx-font-smoothing: grayscale;
|
14 |
+
}
|
15 |
+
|
16 |
+
a {
|
17 |
+
font-weight: 500;
|
18 |
+
color: #646cff;
|
19 |
+
text-decoration: inherit;
|
20 |
+
}
|
21 |
+
a:hover {
|
22 |
+
color: #535bf2;
|
23 |
+
}
|
24 |
+
|
25 |
+
body {
|
26 |
+
margin: 0;
|
27 |
+
display: flex;
|
28 |
+
place-items: center;
|
29 |
+
min-width: 320px;
|
30 |
+
min-height: 100vh;
|
31 |
+
}
|
32 |
+
|
33 |
+
h1 {
|
34 |
+
font-size: 3.2em;
|
35 |
+
line-height: 1.1;
|
36 |
+
}
|
37 |
+
|
38 |
+
button {
|
39 |
+
border-radius: 8px;
|
40 |
+
border: 1px solid transparent;
|
41 |
+
padding: 0.6em 1.2em;
|
42 |
+
font-size: 1em;
|
43 |
+
font-weight: 500;
|
44 |
+
font-family: inherit;
|
45 |
+
background-color: #1a1a1a;
|
46 |
+
cursor: pointer;
|
47 |
+
transition: border-color 0.25s;
|
48 |
+
}
|
49 |
+
button:hover {
|
50 |
+
border-color: #646cff;
|
51 |
+
}
|
52 |
+
button:focus,
|
53 |
+
button:focus-visible {
|
54 |
+
outline: 4px auto -webkit-focus-ring-color;
|
55 |
+
}
|
56 |
+
|
57 |
+
@media (prefers-color-scheme: light) {
|
58 |
+
:root {
|
59 |
+
color: #213547;
|
60 |
+
background-color: #ffffff;
|
61 |
+
}
|
62 |
+
a:hover {
|
63 |
+
color: #747bff;
|
64 |
+
}
|
65 |
+
button {
|
66 |
+
background-color: #f9f9f9;
|
67 |
+
}
|
68 |
+
}
|
src/index.tsx
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* @refresh reload */
|
2 |
+
import { render } from 'solid-js/web'
|
3 |
+
|
4 |
+
import './index.css'
|
5 |
+
import App from './App'
|
6 |
+
|
7 |
+
const root = document.getElementById('root')
|
8 |
+
|
9 |
+
render(() => <App />, root!)
|
src/vite-env.d.ts
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
/// <reference types="vite/client" />
|
sugoi-v4-space/.gitignore
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Logs
|
2 |
+
logs
|
3 |
+
*.log
|
4 |
+
npm-debug.log*
|
5 |
+
yarn-debug.log*
|
6 |
+
yarn-error.log*
|
7 |
+
pnpm-debug.log*
|
8 |
+
lerna-debug.log*
|
9 |
+
|
10 |
+
node_modules
|
11 |
+
dist
|
12 |
+
dist-ssr
|
13 |
+
*.local
|
14 |
+
|
15 |
+
# Editor directories and files
|
16 |
+
.vscode/*
|
17 |
+
!.vscode/extensions.json
|
18 |
+
.idea
|
19 |
+
.DS_Store
|
20 |
+
*.suo
|
21 |
+
*.ntvs*
|
22 |
+
*.njsproj
|
23 |
+
*.sln
|
24 |
+
*.sw?
|
tsconfig.app.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"compilerOptions": {
|
3 |
+
"target": "ES2020",
|
4 |
+
"useDefineForClassFields": true,
|
5 |
+
"module": "ESNext",
|
6 |
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
7 |
+
"skipLibCheck": true,
|
8 |
+
|
9 |
+
/* Bundler mode */
|
10 |
+
"moduleResolution": "bundler",
|
11 |
+
"allowImportingTsExtensions": true,
|
12 |
+
"isolatedModules": true,
|
13 |
+
"moduleDetection": "force",
|
14 |
+
"noEmit": true,
|
15 |
+
"jsx": "preserve",
|
16 |
+
"jsxImportSource": "solid-js",
|
17 |
+
|
18 |
+
/* Linting */
|
19 |
+
"strict": true,
|
20 |
+
"noUnusedLocals": true,
|
21 |
+
"noUnusedParameters": true,
|
22 |
+
"noFallthroughCasesInSwitch": true
|
23 |
+
},
|
24 |
+
"include": ["src"]
|
25 |
+
}
|
tsconfig.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"files": [],
|
3 |
+
"references": [
|
4 |
+
{ "path": "./tsconfig.app.json" },
|
5 |
+
{ "path": "./tsconfig.node.json" }
|
6 |
+
]
|
7 |
+
}
|
tsconfig.node.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"compilerOptions": {
|
3 |
+
"target": "ES2022",
|
4 |
+
"lib": ["ES2023"],
|
5 |
+
"module": "ESNext",
|
6 |
+
"skipLibCheck": true,
|
7 |
+
|
8 |
+
/* Bundler mode */
|
9 |
+
"moduleResolution": "bundler",
|
10 |
+
"allowImportingTsExtensions": true,
|
11 |
+
"isolatedModules": true,
|
12 |
+
"moduleDetection": "force",
|
13 |
+
"noEmit": true,
|
14 |
+
|
15 |
+
/* Linting */
|
16 |
+
"strict": true,
|
17 |
+
"noUnusedLocals": true,
|
18 |
+
"noUnusedParameters": true,
|
19 |
+
"noFallthroughCasesInSwitch": true
|
20 |
+
},
|
21 |
+
"include": ["vite.config.ts"]
|
22 |
+
}
|
vite.config.ts
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { defineConfig } from 'vite'
|
2 |
+
import solid from 'vite-plugin-solid'
|
3 |
+
|
4 |
+
export default defineConfig({
|
5 |
+
plugins: [solid()],
|
6 |
+
})
|