parent
957797c35e
commit
0e4fe568c3
@ -1,132 +0,0 @@ |
|||||||
# ---> Node |
|
||||||
# Logs |
|
||||||
logs |
|
||||||
*.log |
|
||||||
npm-debug.log* |
|
||||||
yarn-debug.log* |
|
||||||
yarn-error.log* |
|
||||||
lerna-debug.log* |
|
||||||
.pnpm-debug.log* |
|
||||||
|
|
||||||
# Diagnostic reports (https://nodejs.org/api/report.html) |
|
||||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
|
||||||
|
|
||||||
# Runtime data |
|
||||||
pids |
|
||||||
*.pid |
|
||||||
*.seed |
|
||||||
*.pid.lock |
|
||||||
|
|
||||||
# Directory for instrumented libs generated by jscoverage/JSCover |
|
||||||
lib-cov |
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul |
|
||||||
coverage |
|
||||||
*.lcov |
|
||||||
|
|
||||||
# nyc test coverage |
|
||||||
.nyc_output |
|
||||||
|
|
||||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) |
|
||||||
.grunt |
|
||||||
|
|
||||||
# Bower dependency directory (https://bower.io/) |
|
||||||
bower_components |
|
||||||
|
|
||||||
# node-waf configuration |
|
||||||
.lock-wscript |
|
||||||
|
|
||||||
# Compiled binary addons (https://nodejs.org/api/addons.html) |
|
||||||
build/Release |
|
||||||
|
|
||||||
# Dependency directories |
|
||||||
node_modules/ |
|
||||||
jspm_packages/ |
|
||||||
|
|
||||||
# Snowpack dependency directory (https://snowpack.dev/) |
|
||||||
web_modules/ |
|
||||||
|
|
||||||
# TypeScript cache |
|
||||||
*.tsbuildinfo |
|
||||||
|
|
||||||
# Optional npm cache directory |
|
||||||
.npm |
|
||||||
|
|
||||||
# Optional eslint cache |
|
||||||
.eslintcache |
|
||||||
|
|
||||||
# Optional stylelint cache |
|
||||||
.stylelintcache |
|
||||||
|
|
||||||
# Microbundle cache |
|
||||||
.rpt2_cache/ |
|
||||||
.rts2_cache_cjs/ |
|
||||||
.rts2_cache_es/ |
|
||||||
.rts2_cache_umd/ |
|
||||||
|
|
||||||
# Optional REPL history |
|
||||||
.node_repl_history |
|
||||||
|
|
||||||
# Output of 'npm pack' |
|
||||||
*.tgz |
|
||||||
|
|
||||||
# Yarn Integrity file |
|
||||||
.yarn-integrity |
|
||||||
|
|
||||||
# dotenv environment variable files |
|
||||||
.env |
|
||||||
.env.development.local |
|
||||||
.env.test.local |
|
||||||
.env.production.local |
|
||||||
.env.local |
|
||||||
|
|
||||||
# parcel-bundler cache (https://parceljs.org/) |
|
||||||
.cache |
|
||||||
.parcel-cache |
|
||||||
|
|
||||||
# Next.js build output |
|
||||||
.next |
|
||||||
out |
|
||||||
|
|
||||||
# Nuxt.js build / generate output |
|
||||||
.nuxt |
|
||||||
dist |
|
||||||
|
|
||||||
# Gatsby files |
|
||||||
.cache/ |
|
||||||
# Comment in the public line in if your project uses Gatsby and not Next.js |
|
||||||
# https://nextjs.org/blog/next-9-1#public-directory-support |
|
||||||
# public |
|
||||||
|
|
||||||
# vuepress build output |
|
||||||
.vuepress/dist |
|
||||||
|
|
||||||
# vuepress v2.x temp and cache directory |
|
||||||
.temp |
|
||||||
.cache |
|
||||||
|
|
||||||
# Docusaurus cache and generated files |
|
||||||
.docusaurus |
|
||||||
|
|
||||||
# Serverless directories |
|
||||||
.serverless/ |
|
||||||
|
|
||||||
# FuseBox cache |
|
||||||
.fusebox/ |
|
||||||
|
|
||||||
# DynamoDB Local files |
|
||||||
.dynamodb/ |
|
||||||
|
|
||||||
# TernJS port file |
|
||||||
.tern-port |
|
||||||
|
|
||||||
# Stores VSCode versions used for testing VSCode extensions |
|
||||||
.vscode-test |
|
||||||
|
|
||||||
# yarn v2 |
|
||||||
.yarn/cache |
|
||||||
.yarn/unplugged |
|
||||||
.yarn/build-state.yml |
|
||||||
.yarn/install-state.gz |
|
||||||
.pnp.* |
|
||||||
|
|
@ -0,0 +1,8 @@ |
|||||||
|
# 默认忽略的文件 |
||||||
|
/shelf/ |
||||||
|
/workspace.xml |
||||||
|
# Datasource local storage ignored files |
||||||
|
/dataSources/ |
||||||
|
/dataSources.local.xml |
||||||
|
# 基于编辑器的 HTTP 客户端请求 |
||||||
|
/httpRequests/ |
@ -0,0 +1,12 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<module type="WEB_MODULE" version="4"> |
||||||
|
<component name="NewModuleRootManager"> |
||||||
|
<content url="file://$MODULE_DIR$"> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/temp" /> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" /> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" /> |
||||||
|
</content> |
||||||
|
<orderEntry type="inheritedJdk" /> |
||||||
|
<orderEntry type="sourceFolder" forTests="false" /> |
||||||
|
</component> |
||||||
|
</module> |
@ -0,0 +1,8 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project version="4"> |
||||||
|
<component name="ProjectModuleManager"> |
||||||
|
<modules> |
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/A.I.N.Y.iml" filepath="$PROJECT_DIR$/.idea/A.I.N.Y.iml" /> |
||||||
|
</modules> |
||||||
|
</component> |
||||||
|
</project> |
@ -0,0 +1,6 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project version="4"> |
||||||
|
<component name="VcsDirectoryMappings"> |
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" /> |
||||||
|
</component> |
||||||
|
</project> |
@ -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? |
@ -0,0 +1,13 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="zh"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8" /> |
||||||
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> |
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
||||||
|
<title>Vite + React</title> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<div id="root"></div> |
||||||
|
<script type="module" src="/src/main.jsx"></script> |
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1,21 @@ |
|||||||
|
{ |
||||||
|
"name": "ying-drosophila", |
||||||
|
"private": true, |
||||||
|
"version": "0.0.0", |
||||||
|
"type": "module", |
||||||
|
"scripts": { |
||||||
|
"dev": "vite", |
||||||
|
"build": "vite build", |
||||||
|
"preview": "vite preview" |
||||||
|
}, |
||||||
|
"dependencies": { |
||||||
|
"react": "^18.2.0", |
||||||
|
"react-dom": "^18.2.0" |
||||||
|
}, |
||||||
|
"devDependencies": { |
||||||
|
"@types/react": "^18.0.26", |
||||||
|
"@types/react-dom": "^18.0.9", |
||||||
|
"@vitejs/plugin-react": "^3.0.0", |
||||||
|
"vite": "^4.0.0" |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,41 @@ |
|||||||
|
#root { |
||||||
|
max-width: 1280px; |
||||||
|
margin: 0 auto; |
||||||
|
padding: 2rem; |
||||||
|
text-align: center; |
||||||
|
} |
||||||
|
|
||||||
|
.logo { |
||||||
|
height: 6em; |
||||||
|
padding: 1.5em; |
||||||
|
will-change: filter; |
||||||
|
} |
||||||
|
.logo:hover { |
||||||
|
filter: drop-shadow(0 0 2em #646cffaa); |
||||||
|
} |
||||||
|
.logo.react:hover { |
||||||
|
filter: drop-shadow(0 0 2em #61dafbaa); |
||||||
|
} |
||||||
|
|
||||||
|
@keyframes logo-spin { |
||||||
|
from { |
||||||
|
transform: rotate(0deg); |
||||||
|
} |
||||||
|
to { |
||||||
|
transform: rotate(360deg); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@media (prefers-reduced-motion: no-preference) { |
||||||
|
a:nth-of-type(2) .logo { |
||||||
|
animation: logo-spin infinite 20s linear; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.card { |
||||||
|
padding: 2em; |
||||||
|
} |
||||||
|
|
||||||
|
.read-the-docs { |
||||||
|
color: #888; |
||||||
|
} |
@ -0,0 +1,34 @@ |
|||||||
|
import { useState } from 'react' |
||||||
|
import reactLogo from './assets/react.svg' |
||||||
|
import './App.css' |
||||||
|
|
||||||
|
function App() { |
||||||
|
const [count, setCount] = useState(0) |
||||||
|
|
||||||
|
return ( |
||||||
|
<div className="App"> |
||||||
|
<div> |
||||||
|
<a href="https://vitejs.dev" target="_blank"> |
||||||
|
<img src="/vite.svg" className="logo" alt="Vite logo" /> |
||||||
|
</a> |
||||||
|
<a href="https://reactjs.org" target="_blank"> |
||||||
|
<img src={reactLogo} className="logo react" alt="React logo" /> |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
<h1>Vite + React</h1> |
||||||
|
<div className="card"> |
||||||
|
<button onClick={() => setCount((count) => count + 1)}> |
||||||
|
count is {count} |
||||||
|
</button> |
||||||
|
<p> |
||||||
|
Edit <code>src/App.jsx</code> and save to test HMR |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
<p className="read-the-docs"> |
||||||
|
Click on the Vite and React logos to learn more |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
) |
||||||
|
} |
||||||
|
|
||||||
|
export default App |
After Width: | Height: | Size: 4.0 KiB |
@ -0,0 +1,70 @@ |
|||||||
|
:root { |
||||||
|
font-family: Inter, Avenir, Helvetica, Arial, sans-serif; |
||||||
|
font-size: 16px; |
||||||
|
line-height: 24px; |
||||||
|
font-weight: 400; |
||||||
|
|
||||||
|
color-scheme: light dark; |
||||||
|
color: rgba(255, 255, 255, 0.87); |
||||||
|
background-color: #242424; |
||||||
|
|
||||||
|
font-synthesis: none; |
||||||
|
text-rendering: optimizeLegibility; |
||||||
|
-webkit-font-smoothing: antialiased; |
||||||
|
-moz-osx-font-smoothing: grayscale; |
||||||
|
-webkit-text-size-adjust: 100%; |
||||||
|
} |
||||||
|
|
||||||
|
a { |
||||||
|
font-weight: 500; |
||||||
|
color: #646cff; |
||||||
|
text-decoration: inherit; |
||||||
|
} |
||||||
|
a:hover { |
||||||
|
color: #535bf2; |
||||||
|
} |
||||||
|
|
||||||
|
body { |
||||||
|
margin: 0; |
||||||
|
display: flex; |
||||||
|
place-items: center; |
||||||
|
min-width: 320px; |
||||||
|
min-height: 100vh; |
||||||
|
} |
||||||
|
|
||||||
|
h1 { |
||||||
|
font-size: 3.2em; |
||||||
|
line-height: 1.1; |
||||||
|
} |
||||||
|
|
||||||
|
button { |
||||||
|
border-radius: 8px; |
||||||
|
border: 1px solid transparent; |
||||||
|
padding: 0.6em 1.2em; |
||||||
|
font-size: 1em; |
||||||
|
font-weight: 500; |
||||||
|
font-family: inherit; |
||||||
|
background-color: #1a1a1a; |
||||||
|
cursor: pointer; |
||||||
|
transition: border-color 0.25s; |
||||||
|
} |
||||||
|
button:hover { |
||||||
|
border-color: #646cff; |
||||||
|
} |
||||||
|
button:focus, |
||||||
|
button:focus-visible { |
||||||
|
outline: 4px auto -webkit-focus-ring-color; |
||||||
|
} |
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) { |
||||||
|
:root { |
||||||
|
color: #213547; |
||||||
|
background-color: #ffffff; |
||||||
|
} |
||||||
|
a:hover { |
||||||
|
color: #747bff; |
||||||
|
} |
||||||
|
button { |
||||||
|
background-color: #f9f9f9; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
import React from 'react' |
||||||
|
import ReactDOM from 'react-dom/client' |
||||||
|
import App from './App' |
||||||
|
import './index.css' |
||||||
|
|
||||||
|
ReactDOM.createRoot(document.getElementById('root')).render( |
||||||
|
<React.StrictMode> |
||||||
|
<App /> |
||||||
|
</React.StrictMode>, |
||||||
|
) |
@ -0,0 +1,7 @@ |
|||||||
|
import { defineConfig } from 'vite' |
||||||
|
import react from '@vitejs/plugin-react' |
||||||
|
|
||||||
|
// https://vitejs.dev/config/
|
||||||
|
export default defineConfig({ |
||||||
|
plugins: [react()], |
||||||
|
}) |
Loading…
Reference in new issue