-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #353 from ZJUEarthData/feature/init-frontend
feat: added front-end initialization settings
- Loading branch information
Showing
55 changed files
with
531 additions
and
1,013 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
.DS_Store | ||
.vscode | ||
dist | ||
dist-ssr | ||
coverage | ||
*.local | ||
|
||
/cypress/videos/ | ||
/cypress/screenshots/ | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
*.tsbuildinfo |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"semi": false, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"printWidth": 100, | ||
"trailingComma": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "extends": ["stylelint-config-standard"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Project Setup | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
### Compile and Hot-Reload for Development | ||
|
||
```sh | ||
npm run start | ||
``` | ||
|
||
### Compile and Minify for Production | ||
|
||
```sh | ||
npm run build | ||
``` | ||
|
||
### Lint with [ESLint](https://eslint.org/) | ||
|
||
```sh | ||
npm run lint | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable */ | ||
/* prettier-ignore */ | ||
// @ts-nocheck | ||
// noinspection JSUnusedGlobalSymbols | ||
// Generated by unplugin-auto-import | ||
export {} | ||
declare global { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
// Generated by unplugin-vue-components | ||
// Read more: https://github.com/vuejs/core/pull/3399 | ||
export {} | ||
|
||
/* prettier-ignore */ | ||
declare module 'vue' { | ||
export interface GlobalComponents { | ||
NavBar: typeof import('./src/components/nav-bar.vue')['default'] | ||
RouterLink: typeof import('vue-router')['RouterLink'] | ||
RouterView: typeof import('vue-router')['RouterView'] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="vite/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import globals from 'globals' | ||
import pluginJs from '@eslint/js' | ||
// import tseslint from "typescript-eslint"; | ||
import pluginVue from 'eslint-plugin-vue' | ||
|
||
export default [ | ||
{ languageOptions: { globals: globals.browser } }, | ||
pluginJs.configs.recommended, | ||
// ...tseslint.configs.recommended, | ||
...pluginVue.configs['flat/essential'], | ||
{ | ||
rules: { | ||
semi: ['warn', 'never'], | ||
'comma-dangle': ['error', 'never'], | ||
'no-unused-vars': 2, | ||
'space-before-function-paren': 0, | ||
'generator-star-spacing': 'off', | ||
'object-curly-spacing': 0, // 强制在大括号中使用一致的空格 | ||
'array-bracket-spacing': 0 // 方括号 | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,45 @@ | ||
{ | ||
"name": "geochemistrypi", | ||
"version": "0.2.1", | ||
"description": "a Python framework for data-driven geochemistry discovery.", | ||
"main": "src/index.tsx", | ||
"repository": "https://github.com/ZJUEarthData/geochemistrypi", | ||
"author": "Can He", | ||
"license": "MIT", | ||
"name": "frontend-new", | ||
"version": "0.0.0", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"start": "webpack serve --config webpack.config.js --env env=development", | ||
"build": "webpack --config webpack.config.js --env env=production", | ||
"lint": "eslint --fix \"./src/**/*.{js,jsx,ts,tsx,json}\"" | ||
"start": "vite", | ||
"build": "run-p type-check \"build-only {@}\" --", | ||
"preview": "vite preview", | ||
"build-only": "vite build", | ||
"type-check": "vue-tsc --build --force", | ||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", | ||
"format": "prettier --write src/" | ||
}, | ||
"dependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
"element-plus": "^2.7.2", | ||
"pinia": "^2.1.7", | ||
"vue": "^3.4.21", | ||
"vue-router": "^4.3.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.21.5", | ||
"@babel/core": "^7.21.8", | ||
"@babel/plugin-transform-runtime": "^7.21.4", | ||
"@babel/preset-env": "^7.21.5", | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/preset-typescript": "^7.21.5", | ||
"@babel/runtime": "^7.21.5", | ||
"@types/react": "^18.2.6", | ||
"@types/react-dom": "^18.2.4", | ||
"@typescript-eslint/eslint-plugin": "^5.59.6", | ||
"@typescript-eslint/parser": "^5.59.6", | ||
"antd": "^5.6.1", | ||
"axios": "^1.4.0", | ||
"babel-loader": "^9.1.2", | ||
"clean-webpack-plugin": "^4.0.0", | ||
"css-loader": "^6.7.3", | ||
"dotenv": "^16.3.1", | ||
"dotenv-webpack": "^8.0.1", | ||
"eslint": "^8.40.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.32.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"html-webpack-plugin": "^5.5.1", | ||
"prettier": "^2.8.8", | ||
"react-cookie": "^4.1.1", | ||
"react-hot-toast": "^2.4.1", | ||
"react-router-dom": "^6.11.1", | ||
"style-loader": "^3.3.2", | ||
"typescript": "^5.0.4", | ||
"webpack": "^5.82.1", | ||
"webpack-cli": "^5.1.1", | ||
"webpack-dev-server": "^4.15.0" | ||
"@eslint/js": "^9.4.0", | ||
"@tsconfig/node20": "^20.1.4", | ||
"@types/node": "^20.12.5", | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"@vitejs/plugin-vue-jsx": "^3.1.0", | ||
"@vue/compiler-sfc": "^3.4.27", | ||
"@vue/tsconfig": "^0.5.1", | ||
"eslint": "^9.4.0", | ||
"eslint-plugin-vue": "^9.26.0", | ||
"globals": "^15.3.0", | ||
"npm-run-all2": "^6.1.2", | ||
"prettier": "^3.2.5", | ||
"sass": "^1.76.0", | ||
"sass-loader": "^14.2.1", | ||
"typescript": "~5.4.0", | ||
"typescript-eslint": "^7.11.0", | ||
"unplugin-auto-import": "^0.17.5", | ||
"unplugin-vue-components": "^0.27.0", | ||
"vite": "^5.2.8", | ||
"vite-plugin-eslint": "^1.8.1", | ||
"vite-plugin-vue-devtools": "^7.0.25", | ||
"vue-tsc": "^2.0.11" | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script lang="ts" setup> | ||
import { RouterView } from 'vue-router' | ||
import NavBar from './components/nav-bar.vue' | ||
</script> | ||
|
||
<template> | ||
<header> | ||
<NavBar /> | ||
</header> | ||
|
||
<RouterView /> | ||
</template> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
*, | ||
*::before, | ||
*::after { | ||
box-sizing: border-box; | ||
margin: 0; | ||
font-weight: normal; | ||
} | ||
a { | ||
text-decoration: none; | ||
} | ||
ul, | ||
ol { | ||
list-style: none; | ||
} | ||
body { | ||
transition: | ||
color 0.5s, | ||
background-color 0.5s; | ||
line-height: 1.6; | ||
font-family: | ||
Inter, | ||
-apple-system, | ||
BlinkMacSystemFont, | ||
'Segoe UI', | ||
Roboto, | ||
Oxygen, | ||
Ubuntu, | ||
Cantarell, | ||
'Fira Sans', | ||
'Droid Sans', | ||
'Helvetica Neue', | ||
sans-serif; | ||
font-size: 14px; | ||
text-rendering: optimizeLegibility; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@import './base.scss'; | ||
|
||
#app { | ||
min-height: 100vh; | ||
background-color: #fff; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.