create-young-proj 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## v1.6.1
5
+
6
+ [compare changes](https://github.com/BluesYoung-web/create-young-proj/compare/v1.6.0...v1.6.1)
7
+
8
+ ### 🎨 Styles
9
+
10
+ - 🎨 add lint ([7c1538a](https://github.com/BluesYoung-web/create-young-proj/commit/7c1538a))
11
+ - 🎨 lint fix ([0ab6e4d](https://github.com/BluesYoung-web/create-young-proj/commit/0ab6e4d))
12
+
13
+ ### ❤️ Contributors
14
+
15
+ - 张扬 <bluesyoung_web@163.com>
16
+
4
17
  ## v1.6.0
5
18
 
6
19
  [compare changes](https://github.com/BluesYoung-web/create-young-proj/compare/v1.5.0...v1.6.0)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-young-proj",
3
3
  "type": "module",
4
- "version": "1.6.0",
4
+ "version": "1.6.1",
5
5
  "description": "create project from template",
6
6
  "author": "BluesYoung-web",
7
7
  "license": "MIT",
@@ -19,17 +19,17 @@ const teamMembers = [
19
19
  },
20
20
  {
21
21
  icon: {
22
- svg: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="#C71D23" d="M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0zm6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z"/></svg>'
22
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="#C71D23" d="M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0zm6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z"/></svg>',
23
23
  },
24
24
  link: 'https://gitee.com/BluesYoung-web',
25
25
  },
26
26
  {
27
27
  icon: {
28
- svg: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32"><g fill="none"><rect width="30" height="22" x="1" y="5" fill="#B4ACBC" rx="1.5"/><rect width="28" height="18" x="2" y="7" fill="#CDC4D6" rx="1"/><path fill="#E1D8EC" d="m30 23.4l-12.971-7.782a2 2 0 0 0-2.058 0L2 23.4V25a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1v-1.6Z"/><path fill="#998EA4" d="M2 9.766V8h28v1.766L17.544 17.24a3 3 0 0 1-3.088 0L2 9.766Z"/><path fill="#F3EEF8" d="M2 8.6V7a1 1 0 0 1 1-1h26a1 1 0 0 1 1 1v1.6l-12.971 7.783a2 2 0 0 1-2.058 0L2 8.6Z"/><path fill="#00A6ED" d="M16 23a7 7 0 1 0 0-14a7 7 0 0 0 0 14Z"/><path fill="#F4F4F4" d="M16 11.5c-1.21-.02-2.36.44-3.22 1.3c-.87.85-1.34 1.99-1.34 3.2c0 2.48 2.02 4.5 4.5 4.5a.47.47 0 1 0 0-.94c-1.96 0-3.56-1.6-3.56-3.56c0-.96.38-1.86 1.06-2.53c.68-.67 1.59-1.03 2.55-1.03c1.93.03 3.51 1.65 3.51 3.62v.81a.67.67 0 0 1-1.34 0v-3.08a.47.47 0 0 0-.47-.47c-.26 0-.49.21-.49.47v.09c-.44-.35-.99-.57-1.6-.57c-1.4 0-2.54 1.14-2.54 2.54c0 1.4 1.14 2.54 2.54 2.54c.7 0 1.34-.29 1.8-.75c.28.5.81.84 1.42.84c.89 0 1.62-.73 1.62-1.62v-.81c0-2.47-1.99-4.52-4.44-4.55Zm-.39 5.96c-.88 0-1.6-.72-1.6-1.6c0-.88.72-1.6 1.6-1.6c.88 0 1.6.72 1.6 1.6c0 .88-.72 1.6-1.6 1.6Z"/></g></svg>'
28
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32"><g fill="none"><rect width="30" height="22" x="1" y="5" fill="#B4ACBC" rx="1.5"/><rect width="28" height="18" x="2" y="7" fill="#CDC4D6" rx="1"/><path fill="#E1D8EC" d="m30 23.4l-12.971-7.782a2 2 0 0 0-2.058 0L2 23.4V25a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1v-1.6Z"/><path fill="#998EA4" d="M2 9.766V8h28v1.766L17.544 17.24a3 3 0 0 1-3.088 0L2 9.766Z"/><path fill="#F3EEF8" d="M2 8.6V7a1 1 0 0 1 1-1h26a1 1 0 0 1 1 1v1.6l-12.971 7.783a2 2 0 0 1-2.058 0L2 8.6Z"/><path fill="#00A6ED" d="M16 23a7 7 0 1 0 0-14a7 7 0 0 0 0 14Z"/><path fill="#F4F4F4" d="M16 11.5c-1.21-.02-2.36.44-3.22 1.3c-.87.85-1.34 1.99-1.34 3.2c0 2.48 2.02 4.5 4.5 4.5a.47.47 0 1 0 0-.94c-1.96 0-3.56-1.6-3.56-3.56c0-.96.38-1.86 1.06-2.53c.68-.67 1.59-1.03 2.55-1.03c1.93.03 3.51 1.65 3.51 3.62v.81a.67.67 0 0 1-1.34 0v-3.08a.47.47 0 0 0-.47-.47c-.26 0-.49.21-.49.47v.09c-.44-.35-.99-.57-1.6-.57c-1.4 0-2.54 1.14-2.54 2.54c0 1.4 1.14 2.54 2.54 2.54c.7 0 1.34-.29 1.8-.75c.28.5.81.84 1.42.84c.89 0 1.62-.73 1.62-1.62v-.81c0-2.47-1.99-4.52-4.44-4.55Zm-.39 5.96c-.88 0-1.6-.72-1.6-1.6c0-.88.72-1.6 1.6-1.6c.88 0 1.6.72 1.6 1.6c0 .88-.72 1.6-1.6 1.6Z"/></g></svg>',
29
29
  },
30
30
  link: 'mailto:bluesyoung_web@163.com',
31
31
  },
32
- ]
32
+ ],
33
33
  },
34
34
  ]
35
35
  </script>
@@ -42,10 +42,12 @@ const teamMembers = [
42
42
  <h2 id="meet-the-team" op50 font-normal p="t-10 b-2">
43
43
  贡献者
44
44
  </h2>
45
- <div w-full p-10 :class="{
46
- 'flex justify-center items-center': teamMembers.length === 1
47
- }">
48
- <VPTeamMembers :members="teamMembers" />
45
+ <div
46
+ w-full p-10 :class="{
47
+ 'flex justify-center items-center': teamMembers.length === 1,
48
+ }"
49
+ >
50
+ <VPTeamMembers :members="teamMembers" />
49
51
  </div>
50
52
  </div>
51
53
  </main>
@@ -2,15 +2,19 @@
2
2
  * @Author: zhangyang
3
3
  * @Date: 2023-11-17 10:56:27
4
4
  * @LastEditTime: 2023-11-17 14:05:37
5
- * @Description:
5
+ * @Description:
6
6
  -->
7
7
  <script lang="ts" setup>
8
8
  import { ref } from 'vue'
9
+
9
10
  const checked = ref(false)
10
11
  </script>
12
+
11
13
  <template>
12
14
  <div class="flex items-center cursor-pointer my-2" @click="checked = !checked">
13
- <div class="mr-2">{{ checked ? '✅' : '⬜️' }}</div>
15
+ <div class="mr-2">
16
+ {{ checked ? '✅' : '⬜️' }}
17
+ </div>
14
18
  <slot />
15
19
  </div>
16
- </template>
20
+ </template>
@@ -0,0 +1,39 @@
1
+ {
2
+ "prettier.enable": false,
3
+ "editor.formatOnSave": false,
4
+
5
+ // Enable the ESlint flat config support
6
+ "eslint.experimental.useFlatConfig": true,
7
+ // Auto fix
8
+ "editor.codeActionsOnSave": {
9
+ "source.fixAll.eslint": "explicit",
10
+ "source.organizeImports": "never"
11
+ },
12
+
13
+ // Silent the stylistic rules in you IDE, but still auto fix them
14
+ "eslint.rules.customizations": [
15
+ { "rule": "style/*", "severity": "off" },
16
+ { "rule": "*-indent", "severity": "off" },
17
+ { "rule": "*-spacing", "severity": "off" },
18
+ { "rule": "*-spaces", "severity": "off" },
19
+ { "rule": "*-order", "severity": "off" },
20
+ { "rule": "*-dangle", "severity": "off" },
21
+ { "rule": "*-newline", "severity": "off" },
22
+ { "rule": "*quotes", "severity": "off" },
23
+ { "rule": "*semi", "severity": "off" }
24
+ ],
25
+
26
+ // Enable eslint for all supported languages
27
+ "eslint.validate": [
28
+ "javascript",
29
+ "javascriptreact",
30
+ "typescript",
31
+ "typescriptreact",
32
+ "vue",
33
+ "html",
34
+ "markdown",
35
+ "json",
36
+ "jsonc",
37
+ "yaml"
38
+ ]
39
+ }
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![](https://img.shields.io/badge/Author-BluesYoung--web-blue)](https://gitee.com/BluesYoung-web)
4
4
 
5
+ [![code style](https://antfu.me/badge-code-style.svg)](https://github.com/antfu/eslint-config)
6
+
5
7
  ## 本地运行
6
8
 
7
9
  ::: code-group
@@ -5,13 +5,12 @@
5
5
  * @Description:
6
6
  */
7
7
  (async () => {
8
- const env = process.env.DEPLOY_ENV || 'dev';
9
- const listenPort = process.env.LISTEN_PORT || 3333;
10
- console.log('当前环境:', env);
11
- console.log('服务监听端口:', listenPort);
8
+ const env = process.env.DEPLOY_ENV || 'dev'
9
+ const listenPort = process.env.LISTEN_PORT || 3333
10
+ console.log('当前环境:', env)
11
+ console.log('服务监听端口:', listenPort)
12
12
 
13
- process.env.NITRO_PORT = listenPort;
14
-
15
- await import('./.output/server/index.mjs');
16
- })();
13
+ process.env.NITRO_PORT = listenPort
17
14
 
15
+ await import('./.output/server/index.mjs')
16
+ })()
@@ -0,0 +1,46 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-11-01 10:13:50
4
+ * @LastEditTime: 2023-11-30 11:34:48
5
+ * @Description:
6
+ */
7
+ import antfu from '@antfu/eslint-config'
8
+
9
+ export default antfu({
10
+ overrides: {
11
+ vue: {
12
+ 'vue/valid-v-model': 'off',
13
+ 'vue/no-unused-refs': 'off',
14
+ 'vue/no-lone-template': 'off',
15
+ 'vue/valid-attribute-name': 'off',
16
+ },
17
+ typescript: {
18
+ 'ts/no-use-before-define': 'off',
19
+ 'ts/no-unused-vars': 'off',
20
+ 'ts/ban-types': 'off',
21
+ 'ts/ban-ts-comment': 'off',
22
+ 'ts/no-unnecessary-type-constraint': 'off',
23
+ 'import/no-duplicates': 'off',
24
+ },
25
+ jsonc: {
26
+ 'jsonc/no-dupe-keys': 'off',
27
+ },
28
+ },
29
+ rules: {
30
+ 'no-console': 'off',
31
+ 'node/prefer-global/process': 'off',
32
+ 'unused-imports/no-unused-vars': 'off',
33
+ 'no-throw-literal': 'off',
34
+ 'antfu/consistent-list-newline': 'off',
35
+ 'style/jsx-indent': 'off',
36
+ 'node/handle-callback-err': 'off',
37
+ 'no-new': 'off',
38
+ 'no-async-promise-executor': 'off',
39
+ 'no-alert': 'off',
40
+ },
41
+ }, {
42
+ ignores: [
43
+ 'public',
44
+ 'bun.lockb',
45
+ ],
46
+ })
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author: zhangyang
3
3
  * @Date: 2022-12-28 11:59:56
4
- * @LastEditTime: 2023-11-14 09:18:38
4
+ * @LastEditTime: 2023-11-30 12:08:40
5
5
  * @Description:
6
6
  */
7
7
  export default defineNitroConfig({
@@ -14,6 +14,5 @@ export default defineNitroConfig({
14
14
  dir: '.vitepress/dist',
15
15
  },
16
16
  ],
17
- preset: 'bun'
18
17
  });
19
18
 
@@ -1,26 +1,39 @@
1
1
  {
2
+ "type": "module",
3
+ "version": "0.0.0",
2
4
  "scripts": {
5
+ "lint": "eslint .",
6
+ "lint:fix": "eslint . --fix",
3
7
  "dev": "vitepress dev",
4
8
  "docs:dev": "vitepress dev",
5
9
  "docs:build": "vitepress build",
6
10
  "docs:preview": "vitepress preview",
7
11
  "build": "vitepress build && nitropack build",
8
- "postinstall": "nitropack prepare"
12
+ "postinstall": "nitropack prepare && simple-git-hooks"
13
+ },
14
+ "dependencies": {
15
+ "c12": "^1.5.1",
16
+ "md5": "^2.3.0"
9
17
  },
10
18
  "devDependencies": {
19
+ "@antfu/eslint-config": "^2.1.1",
11
20
  "@iconify/json": "^2.2.139",
12
21
  "@types/md5": "^2.3.5",
13
22
  "@types/node": "20",
23
+ "eslint": "^8.54.0",
24
+ "lint-staged": "^15.1.0",
14
25
  "nitropack": "^2.7.2",
15
26
  "pathe": "^1.1.1",
27
+ "simple-git-hooks": "^2.9.0",
16
28
  "unocss": "^0.57.2",
17
29
  "unplugin-vue-components": "^0.25.2",
18
- "vitepress": "^1.0.0-rc.25",
30
+ "vitepress": "1.0.0-rc.25",
19
31
  "vue": "^3.3.8"
20
32
  },
21
- "dependencies": {
22
- "c12": "^1.5.1",
23
- "md5": "^2.3.0"
33
+ "simple-git-hooks": {
34
+ "pre-commit": "npx lint-staged"
24
35
  },
25
- "version": "1.0.0"
36
+ "lint-staged": {
37
+ "*": "eslint --fix"
38
+ }
26
39
  }
@@ -1,3 +1,3 @@
1
1
  {
2
2
  "extends": "./.nitro/types/tsconfig.json"
3
- }
3
+ }