@wangyao-test/vue-element-template 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/package.json +14 -0
  2. package/template/.github/workflows/ci.yml +27 -0
  3. package/template/.github/workflows/gh-pages.yml +57 -0
  4. package/template/.vscode/extensions.json +3 -0
  5. package/template/.vscode/settings.json +36 -0
  6. package/template/README.md +47 -0
  7. package/template/eslint.config.js +7 -0
  8. package/template/index.html +18 -0
  9. package/template/package.json +40 -0
  10. package/template/pnpm-lock.yaml +5757 -0
  11. package/template/public/CNAME +1 -0
  12. package/template/public/element-plus-logo-small.svg +1 -0
  13. package/template/public/favicon.svg +1 -0
  14. package/template/public/vite.svg +1 -0
  15. package/template/src/App.vue +22 -0
  16. package/template/src/assets/vue.svg +1 -0
  17. package/template/src/components/HelloWorld.vue +127 -0
  18. package/template/src/components/Logos.vue +31 -0
  19. package/template/src/components/MessageBoxDemo.vue +24 -0
  20. package/template/src/components/layouts/BaseHeader.vue +73 -0
  21. package/template/src/components/layouts/BaseSide.vue +85 -0
  22. package/template/src/components.d.ts +29 -0
  23. package/template/src/composables/dark.ts +4 -0
  24. package/template/src/composables/index.ts +1 -0
  25. package/template/src/env.d.ts +8 -0
  26. package/template/src/main.ts +46 -0
  27. package/template/src/pages/index.vue +4 -0
  28. package/template/src/pages/nav/1/item-1.vue +5 -0
  29. package/template/src/pages/nav/2.vue +5 -0
  30. package/template/src/pages/nav/4.vue +5 -0
  31. package/template/src/styles/element/dark.scss +11 -0
  32. package/template/src/styles/element/index.scss +42 -0
  33. package/template/src/styles/index.scss +40 -0
  34. package/template/src/typed-router.d.ts +26 -0
  35. package/template/src/types.ts +3 -0
  36. package/template/tsconfig.json +27 -0
  37. package/template/uno.config.ts +37 -0
  38. package/template/vite.config.ts +59 -0
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@wangyao-test/vue-element-template",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "ISC",
11
+ "publishConfig": {
12
+ "access": "public"
13
+ }
14
+ }
@@ -0,0 +1,27 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ typecheck:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+
14
+ - name: Install pnpm
15
+ uses: pnpm/action-setup@v2
16
+ with:
17
+ run_install: true
18
+
19
+ - name: Use Node.js LTS
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: lts/*
23
+ registry-url: https://registry.npmjs.org/
24
+ cache: pnpm
25
+
26
+ - name: Type Check
27
+ run: npm run typecheck
@@ -0,0 +1,57 @@
1
+ name: GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ # Allow one concurrent deployment
15
+ concurrency:
16
+ group: pages
17
+ cancel-in-progress: true
18
+
19
+ jobs:
20
+ build:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+
25
+ - name: Install pnpm
26
+ uses: pnpm/action-setup@v2
27
+ with:
28
+ run_install: true
29
+
30
+ - name: Use Node.js LTS
31
+ uses: actions/setup-node@v4
32
+ with:
33
+ node-version: lts/*
34
+ registry-url: https://registry.npmjs.org/
35
+ cache: pnpm
36
+
37
+ - name: Build
38
+ run: npm run build
39
+
40
+ - name: ⏫ Upload artifact
41
+ uses: actions/upload-pages-artifact@v1
42
+ with:
43
+ path: ./dist
44
+
45
+ deploy:
46
+ needs: build
47
+ runs-on: ubuntu-latest
48
+
49
+ # Deploy to the github-pages environment
50
+ environment:
51
+ name: github-pages
52
+ url: ${{ steps.deployment.outputs.page_url }}
53
+
54
+ steps:
55
+ - name: 🪤 Deploy to GitHub Pages
56
+ id: deployment
57
+ uses: actions/deploy-pages@v1
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar"]
3
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ // Disable the default formatter, use eslint instead
3
+ "prettier.enable": false,
4
+ "editor.formatOnSave": false,
5
+
6
+ // Auto fix
7
+ "editor.codeActionsOnSave": {
8
+ "source.fixAll.eslint": "explicit",
9
+ "source.organizeImports": "never"
10
+ },
11
+
12
+ // Enable eslint for all supported languages
13
+ "eslint.validate": [
14
+ "javascript",
15
+ "javascriptreact",
16
+ "typescript",
17
+ "typescriptreact",
18
+ "vue",
19
+ "html",
20
+ "markdown",
21
+ "json",
22
+ "json5",
23
+ "jsonc",
24
+ "yaml",
25
+ "toml",
26
+ "xml",
27
+ "gql",
28
+ "graphql",
29
+ "astro",
30
+ "css",
31
+ "less",
32
+ "scss",
33
+ "pcss",
34
+ "postcss"
35
+ ]
36
+ }
@@ -0,0 +1,47 @@
1
+ # element-plus-vite-starter
2
+
3
+ > A starter kit for Element Plus with Vite
4
+
5
+ - Preview: <https://vite-starter.element-plus.org>
6
+
7
+ This is an example of on-demand element-plus with [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components).
8
+
9
+ > 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.
10
+
11
+ 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).
12
+
13
+ If you want to a nuxt starter, see [element-plus-nuxt-starter](https://github.com/element-plus/element-plus-nuxt-starter/).
14
+
15
+ ## Project setup
16
+
17
+ ```bash
18
+ pnpm install
19
+
20
+ # npm install
21
+ # yarn install
22
+ ```
23
+
24
+ ### Compiles and hot-reloads for development
25
+
26
+ ```bash
27
+ npm run dev
28
+ ```
29
+
30
+ ### Compiles and minifies for production
31
+
32
+ ```bash
33
+ npm run build
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ```bash
39
+ git clone https://github.com/element-plus/element-plus-vite-starter
40
+ cd element-plus-vite-starter
41
+ npm i
42
+ npm run dev
43
+ ```
44
+
45
+ ### Custom theme
46
+
47
+ See `src/styles/element/index.scss`.
@@ -0,0 +1,7 @@
1
+ import antfu from '@antfu/eslint-config'
2
+
3
+ export default antfu({
4
+ formatters: true,
5
+ unocss: true,
6
+ vue: true,
7
+ })
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="/favicon.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Element Plus Vite Starter</title>
8
+ <!-- element css cdn, if you use custom theme, remove it. -->
9
+ <!-- <link
10
+ rel="stylesheet"
11
+ href="https://cdn.jsdelivr.net/npm/element-plus/dist/index.css"
12
+ /> -->
13
+ </head>
14
+ <body>
15
+ <div id="app"></div>
16
+ <script type="module" src="/src/main.ts"></script>
17
+ </body>
18
+ </html>
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@wangyao-test/vue-element-template",
3
+ "type": "module",
4
+ "version": "0.1.0",
5
+ "license": "MIT",
6
+ "repository": {},
7
+ "scripts": {
8
+ "dev": "vite",
9
+ "build": "vite build",
10
+ "generate": "vite-ssg build",
11
+ "lint": "eslint .",
12
+ "preview": "vite preview",
13
+ "typecheck": "vue-tsc --noEmit"
14
+ },
15
+ "dependencies": {
16
+ "@element-plus/icons-vue": "^2.3.1",
17
+ "@vueuse/core": "^12.0.0",
18
+ "element-plus": "^2.9.0",
19
+ "vue": "^3.5.13",
20
+ "vue-router": "^4.5.0"
21
+ },
22
+ "devDependencies": {
23
+ "@antfu/eslint-config": "^3.11.2",
24
+ "@iconify-json/ep": "^1.2.1",
25
+ "@iconify-json/ri": "^1.2.3",
26
+ "@types/node": "^20.17.10",
27
+ "@unocss/eslint-plugin": "^0.65.1",
28
+ "@vitejs/plugin-vue": "^5.2.1",
29
+ "eslint": "^9.16.0",
30
+ "eslint-plugin-format": "^0.1.3",
31
+ "sass": "^1.82.0",
32
+ "typescript": "^5.6.3",
33
+ "unocss": "^0.65.1",
34
+ "unplugin-vue-components": "^0.27.5",
35
+ "unplugin-vue-router": "^0.10.9",
36
+ "vite": "^6.0.3",
37
+ "vite-ssg": "^0.24.2",
38
+ "vue-tsc": "^2.1.10"
39
+ }
40
+ }