-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xiangxiao
committed
May 9, 2024
0 parents
commit a292d35
Showing
24 changed files
with
1,341 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# lock | ||
yarn.lock | ||
package-lock.json | ||
pnpm-lock.yaml | ||
|
||
*.log |
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,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"antfu.iconify", | ||
"antfu.unocss", | ||
"antfu.goto-alias", | ||
"csstools.postcss", | ||
"dbaeumer.vscode-eslint", | ||
"vue.volar", | ||
"lokalise.i18n-ally", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} |
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,55 @@ | ||
{ | ||
"cSpell.words": ["Vitesse", "Vite", "unocss", "vitest", "vueuse", "pinia", "demi", "antfu", "iconify", "intlify", "vitejs", "unplugin", "pnpm"], | ||
"i18n-ally.sourceLanguage": "en", | ||
"i18n-ally.keystyle": "nested", | ||
"i18n-ally.localesPaths": "locales", | ||
"i18n-ally.sortKeys": true, | ||
|
||
"files.associations": { | ||
"*.css": "postcss" | ||
}, | ||
|
||
// Enable the ESlint flat config support | ||
"eslint.experimental.useFlatConfig": true, | ||
|
||
// Disable the default formatter, use eslint instead | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
|
||
// Auto fix | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports": "never" | ||
}, | ||
|
||
// Silent the stylistic rules in you IDE, but still auto fix them | ||
"eslint.rules.customizations": [ | ||
{ "rule": "style/*", "severity": "off" }, | ||
{ "rule": "format/*", "severity": "off" }, | ||
{ "rule": "*-indent", "severity": "off" }, | ||
{ "rule": "*-spacing", "severity": "off" }, | ||
{ "rule": "*-spaces", "severity": "off" }, | ||
{ "rule": "*-order", "severity": "off" }, | ||
{ "rule": "*-dangle", "severity": "off" }, | ||
{ "rule": "*-newline", "severity": "off" }, | ||
{ "rule": "*quotes", "severity": "off" }, | ||
{ "rule": "*semi", "severity": "off" } | ||
], | ||
|
||
// Enable eslint for all supported languages | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml", | ||
"toml", | ||
"css", | ||
"scss" | ||
] | ||
} |
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,44 @@ | ||
# element-plus-vite-starter | ||
|
||
> A starter kit for Element Plus with Vite | ||
<img width="800" alt="Element Plus" src="https://user-images.githubusercontent.com/10731096/97282764-0726eb80-187a-11eb-9658-6dc98ccb8f8d.png"> | ||
|
||
- Preview: <https://vite-starter.element-plus.org> | ||
|
||
This is an example of on-demand element-plus with [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components). | ||
|
||
> If you want to import all, it may be so simple that no examples are needed. Just follow [quickstart | Docs](https://element-plus.org/zh-CN/guide/quickstart.html) and import them. | ||
If you just want an on-demand import example `manually`, you can check [unplugin-element-plus/examples/vite](https://github.com/element-plus/unplugin-element-plus/tree/main/examples/vite). | ||
|
||
## Project setup | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
### Compiles and minifies for production | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
git clone https://github.com/element-plus/element-plus-vite-starter | ||
cd element-plus-vite-starter | ||
npm i | ||
npm run dev | ||
``` | ||
|
||
### Custom theme | ||
|
||
See `src/styles/element/index.scss`. |
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.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Element Plus Theme Editor</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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "element-plus-theme-editor", | ||
"private": true, | ||
"version": "0.1.0", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"typecheck": "vue-tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@vueuse/core": "9.13.0", | ||
"@element-plus/icons-vue": "^2.3.1", | ||
"element-plus": "^2.7.0", | ||
"color": "^4.2.0", | ||
"pinia": "^2.1.7", | ||
"unocss": "^0.58.0", | ||
"vue": "^3.4.0" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.4.6", | ||
"@iconify-json/carbon": "^1.1.31", | ||
"@types/node": "^18.14.0", | ||
"@vitejs/plugin-vue": "^4.0.0", | ||
"typescript": "^5.2.2", | ||
"unplugin-auto-import": "^0.17.2", | ||
"unplugin-vue-components": "^0.24.0", | ||
"vite": "^4.1.2", | ||
"vite-plugin-pages": "^0.32.0", | ||
"vite-plugin-vue-devtools": "1.0.0-rc.8", | ||
"vite-plugin-vue-layouts": "^0.9.1", | ||
"vue-tsc": "^1.1.3" | ||
}, | ||
"license": "MIT" | ||
} |
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 @@ | ||
vite-starter.element-plus.org |
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,16 @@ | ||
<template> | ||
<el-config-provider> | ||
<HelloWorld /> | ||
</el-config-provider> | ||
</template> | ||
|
||
<style> | ||
#app { | ||
text-align: center; | ||
color: var(--ep-text-color-primary); | ||
} | ||
.element-plus-logo { | ||
width: 50%; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.