lint
This commit is contained in:
1 parent
fc250c54ed
commit
5eec516459
62 files changed
+3912
-3376
No files matched your search
@@ -40,7 +40,7 @@ publish: [
|
||||
releaseType: 'release',
|
||||
token: process.env.GH_TOKEN || '' // 从环境变量获取
|
||||
}
|
||||
]
|
||||
];
|
||||
```
|
||||
|
||||
## 发布更新
|
||||
@@ -58,4 +58,4 @@ pnpm build:all
|
||||
|
||||
- 请确保 GitHub token 权限最小化,仅授予必要的访问权限
|
||||
- 对于分发给公众的私有应用,用户需要有访问仓库的权限才能下载更新
|
||||
- 在 CI/CD 环境中,确保在环境变量中配置了相应的 token
|
||||
- 在 CI/CD 环境中,确保在环境变量中配置了相应的 token
|
||||
@@ -1,14 +1,15 @@
|
||||
import { withSidebar } from 'vitepress-sidebar'
|
||||
import { name, repository, homepage } from '../../../package.json'
|
||||
import { defineConfig, UserConfig } from 'vitepress'
|
||||
import { withI18n } from 'vitepress-i18n'
|
||||
import type { VitePressSidebarOptions } from 'vitepress-sidebar/types'
|
||||
import type { VitePressI18nOptions } from 'vitepress-i18n/types'
|
||||
import type { UserConfig } from 'vitepress';
|
||||
import type { VitePressI18nOptions } from 'vitepress-i18n/types';
|
||||
import type { VitePressSidebarOptions } from 'vitepress-sidebar/types';
|
||||
import { defineConfig } from 'vitepress';
|
||||
import { withI18n } from 'vitepress-i18n';
|
||||
import { withSidebar } from 'vitepress-sidebar';
|
||||
import { homepage, name, repository } from '../../../package.json';
|
||||
|
||||
const capitalizeFirst = (str: string): string =>
|
||||
str.charAt(0).toUpperCase() + str.slice(1)
|
||||
const supportLocales = ['en', 'ko', 'zhHans']
|
||||
const defaultLocale: string = supportLocales[0]
|
||||
str.charAt(0).toUpperCase() + str.slice(1);
|
||||
const supportLocales = ['en', 'ko', 'zhHans'];
|
||||
const defaultLocale: string = supportLocales[0];
|
||||
|
||||
const vitePressI18nConfigs: VitePressI18nOptions = {
|
||||
locales: supportLocales,
|
||||
@@ -18,35 +19,35 @@ const vitePressI18nConfigs: VitePressI18nOptions = {
|
||||
en: 'Vutron is a preconfigured template for developing Electron cross-platform desktop apps. It uses Vue 3 and allows you to build a fast development environment with little effort.',
|
||||
ko: 'Vutron은 Electron 크로스 플랫폼 데스크톱 앱 개발을 위해 미리 구성된 템플릿입니다. Vue 3을 사용하며 적은 노력으로 빠른 개발 환경을 구축할 수 있습니다.',
|
||||
zhHans:
|
||||
'Vutron 是用于开发 Electron 跨平台桌面应用程序的预配置模板。它使用 Vue 3,可让您轻松构建快速开发环境。'
|
||||
'Vutron 是用于开发 Electron 跨平台桌面应用程序的预配置模板。它使用 Vue 3,可让您轻松构建快速开发环境。',
|
||||
},
|
||||
themeConfig: {
|
||||
en: {
|
||||
nav: [
|
||||
{
|
||||
text: 'Getting Started',
|
||||
link: '/installation-and-build/getting-started'
|
||||
}
|
||||
]
|
||||
link: '/installation-and-build/getting-started',
|
||||
},
|
||||
],
|
||||
},
|
||||
ko: {
|
||||
nav: [
|
||||
{
|
||||
text: '시작하기',
|
||||
link: '/ko/installation-and-build/getting-started'
|
||||
}
|
||||
]
|
||||
link: '/ko/installation-and-build/getting-started',
|
||||
},
|
||||
],
|
||||
},
|
||||
zhHans: {
|
||||
nav: [
|
||||
{
|
||||
text: '入门',
|
||||
link: '/zhHans/installation-and-build/getting-started'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
link: '/zhHans/installation-and-build/getting-started',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const vitePressSidebarConfigs: VitePressSidebarOptions = [
|
||||
...supportLocales.map((lang) => {
|
||||
@@ -62,14 +63,14 @@ const vitePressSidebarConfigs: VitePressSidebarOptions = [
|
||||
'introduction.md',
|
||||
'installation-and-build',
|
||||
'project-structures',
|
||||
'electron-how-to'
|
||||
'electron-how-to',
|
||||
],
|
||||
documentRootPath: `/src/${lang}`,
|
||||
resolvePath: defaultLocale === lang ? '/' : `/${lang}/`,
|
||||
...(defaultLocale === lang ? {} : { basePath: `/${lang}/` })
|
||||
}
|
||||
})
|
||||
]
|
||||
...(defaultLocale === lang ? {} : { basePath: `/${lang}/` }),
|
||||
};
|
||||
}),
|
||||
];
|
||||
|
||||
const vitePressConfigs: UserConfig = {
|
||||
title: capitalizeFirst(name),
|
||||
@@ -77,28 +78,28 @@ const vitePressConfigs: UserConfig = {
|
||||
outDir: '../dist',
|
||||
head: [
|
||||
['link', { rel: 'icon', href: '/logo.png' }],
|
||||
['link', { rel: 'shortcut icon', href: '/favicon.ico' }]
|
||||
['link', { rel: 'shortcut icon', href: '/favicon.ico' }],
|
||||
],
|
||||
cleanUrls: true,
|
||||
metaChunk: true,
|
||||
rewrites: {
|
||||
'en/:rest*': ':rest*'
|
||||
'en/:rest*': ':rest*',
|
||||
},
|
||||
sitemap: {
|
||||
hostname: homepage
|
||||
hostname: homepage,
|
||||
},
|
||||
themeConfig: {
|
||||
logo: { src: '/icon.png', width: 24, height: 24 },
|
||||
editLink: {
|
||||
pattern: 'https://github.com/jooy2/vutron/edit/main/docs/src/:path'
|
||||
pattern: 'https://github.com/jooy2/vutron/edit/main/docs/src/:path',
|
||||
},
|
||||
socialLinks: [{ icon: 'github', link: repository.url.replace('.git', '') }]
|
||||
}
|
||||
}
|
||||
socialLinks: [{ icon: 'github', link: repository.url.replace('.git', '') }],
|
||||
},
|
||||
};
|
||||
|
||||
export default defineConfig(
|
||||
withSidebar(
|
||||
withI18n(vitePressConfigs, vitePressI18nConfigs),
|
||||
vitePressSidebarConfigs
|
||||
)
|
||||
)
|
||||
vitePressSidebarConfigs,
|
||||
),
|
||||
);
|
||||
@@ -19,7 +19,7 @@ If you want to skip the security issues and use Node.js scripts in your renderer
|
||||
```javascript
|
||||
rendererPlugin({
|
||||
nodeIntegration: true
|
||||
})
|
||||
});
|
||||
```
|
||||
|
||||
For more information on this, see the following articles: https://github.com/electron-vite/vite-plugin-electron-renderer
|
||||
@@ -9,31 +9,31 @@ order: 3
|
||||
|
||||
## General
|
||||
|
||||
| Script Name | Description |
|
||||
| --- | --- |
|
||||
| `dev` | Start Electron as a development environment |
|
||||
| `dev:debug` | Start Electron as a development environment (with vite debug) |
|
||||
| `dev:debug:force` | Start Electron as a development environment (with vite debug + clean vite cache) |
|
||||
| `build:pre` | Commands commonly run at build time. This script does not need to be run separately. |
|
||||
| `build` | Build the package for the current operating system. |
|
||||
| `build:all` | Build a specified package for the entire operating system (Requires cross-platform build configuration) |
|
||||
| `build:dir` | `electron-builder` directory build |
|
||||
| `build:mac` | Build preconfigured packages for macOS |
|
||||
| `build:linux` | Build preconfigured packages for Linux |
|
||||
| `build:win` | Build preconfigured packages for Windows |
|
||||
| `lint` | ESLint code inspection. It does not modify the code. |
|
||||
| `lint:fix` | ESLint code inspection. Use auto-fix to fix your code. |
|
||||
| `format` | Prettier code inspection. It does not modify the code. |
|
||||
| `format:fix` | Prettier code inspection. Use auto-fix to fix your code. |
|
||||
| `test` | Build a package for testing and run tests against the test specification file. |
|
||||
| `test:linux` | Build a package for testing and run tests against the test specification file. (for linux ci only) |
|
||||
| Script Name | Description |
|
||||
| ----------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| `dev` | Start Electron as a development environment |
|
||||
| `dev:debug` | Start Electron as a development environment (with vite debug) |
|
||||
| `dev:debug:force` | Start Electron as a development environment (with vite debug + clean vite cache) |
|
||||
| `build:pre` | Commands commonly run at build time. This script does not need to be run separately. |
|
||||
| `build` | Build the package for the current operating system. |
|
||||
| `build:all` | Build a specified package for the entire operating system (Requires cross-platform build configuration) |
|
||||
| `build:dir` | `electron-builder` directory build |
|
||||
| `build:mac` | Build preconfigured packages for macOS |
|
||||
| `build:linux` | Build preconfigured packages for Linux |
|
||||
| `build:win` | Build preconfigured packages for Windows |
|
||||
| `lint` | ESLint code inspection. It does not modify the code. |
|
||||
| `lint:fix` | ESLint code inspection. Use auto-fix to fix your code. |
|
||||
| `format` | Prettier code inspection. It does not modify the code. |
|
||||
| `format:fix` | Prettier code inspection. Use auto-fix to fix your code. |
|
||||
| `test` | Build a package for testing and run tests against the test specification file. |
|
||||
| `test:linux` | Build a package for testing and run tests against the test specification file. (for linux ci only) |
|
||||
|
||||
## For Documentation
|
||||
|
||||
Used only for contributing to project documentation. Must be run from the `docs` directory location.
|
||||
|
||||
| Script Name | Description |
|
||||
| --- | --- |
|
||||
| `dev` | Start the local document server. (For development) |
|
||||
| `build` | Build a local document server. Used only for GitHub page builders. |
|
||||
| `serve` | Start the local document server. |
|
||||
| Script Name | Description |
|
||||
| ----------- | ------------------------------------------------------------------ |
|
||||
| `dev` | Start the local document server. (For development) |
|
||||
| `build` | Build a local document server. Used only for GitHub page builders. |
|
||||
| `serve` | Start the local document server. |
|
||||
@@ -19,7 +19,7 @@
|
||||
```javascript
|
||||
rendererPlugin({
|
||||
nodeIntegration: true
|
||||
})
|
||||
});
|
||||
```
|
||||
|
||||
이에 대한 자세한 내용은 다음 문서를 참조하세요: https://github.com/electron-vite/vite-plugin-electron-renderer
|
||||
@@ -9,31 +9,31 @@ order: 3
|
||||
|
||||
## 일반
|
||||
|
||||
| Script Name | Description |
|
||||
| --- | --- |
|
||||
| `dev` | Start Electron as a development environment |
|
||||
| `dev:debug` | Start Electron as a development environment (with vite debug) |
|
||||
| `dev:debug:force` | Start Electron as a development environment (with vite debug + clean vite cache) |
|
||||
| `build:pre` | Commands commonly run at build time. This script does not need to be run separately. |
|
||||
| `build` | Build the package for the current operating system. |
|
||||
| `build:all` | Build a specified package for the entire operating system (Requires cross-platform build configuration) |
|
||||
| `build:dir` | `electron-builder` directory build |
|
||||
| `build:mac` | Build preconfigured packages for macOS |
|
||||
| `build:linux` | Build preconfigured packages for Linux |
|
||||
| `build:win` | Build preconfigured packages for Windows |
|
||||
| `lint` | ESLint code inspection. It does not modify the code. |
|
||||
| `lint:fix` | ESLint code inspection. Use auto-fix to fix your code. |
|
||||
| `format` | Prettier code inspection. It does not modify the code. |
|
||||
| `format:fix` | Prettier code inspection. Use auto-fix to fix your code. |
|
||||
| `test` | Build a package for testing and run tests against the test specification file. |
|
||||
| `test:linux` | Build a package for testing and run tests against the test specification file. (for linux ci only) |
|
||||
| Script Name | Description |
|
||||
| ----------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| `dev` | Start Electron as a development environment |
|
||||
| `dev:debug` | Start Electron as a development environment (with vite debug) |
|
||||
| `dev:debug:force` | Start Electron as a development environment (with vite debug + clean vite cache) |
|
||||
| `build:pre` | Commands commonly run at build time. This script does not need to be run separately. |
|
||||
| `build` | Build the package for the current operating system. |
|
||||
| `build:all` | Build a specified package for the entire operating system (Requires cross-platform build configuration) |
|
||||
| `build:dir` | `electron-builder` directory build |
|
||||
| `build:mac` | Build preconfigured packages for macOS |
|
||||
| `build:linux` | Build preconfigured packages for Linux |
|
||||
| `build:win` | Build preconfigured packages for Windows |
|
||||
| `lint` | ESLint code inspection. It does not modify the code. |
|
||||
| `lint:fix` | ESLint code inspection. Use auto-fix to fix your code. |
|
||||
| `format` | Prettier code inspection. It does not modify the code. |
|
||||
| `format:fix` | Prettier code inspection. Use auto-fix to fix your code. |
|
||||
| `test` | Build a package for testing and run tests against the test specification file. |
|
||||
| `test:linux` | Build a package for testing and run tests against the test specification file. (for linux ci only) |
|
||||
|
||||
## 문서용
|
||||
|
||||
프로젝트 문서에 기여하는 경우에만 사용됩니다. `docs` 디렉토리 위치에서 실행해야 합니다.
|
||||
|
||||
| Script Name | Description |
|
||||
| --- | --- |
|
||||
| `dev` | Start the local document server. (For development) |
|
||||
| `build` | Build a local document server. Used only for GitHub page builders. |
|
||||
| `serve` | Start the local document server. |
|
||||
| Script Name | Description |
|
||||
| ----------- | ------------------------------------------------------------------ |
|
||||
| `dev` | Start the local document server. (For development) |
|
||||
| `build` | Build a local document server. Used only for GitHub page builders. |
|
||||
| `serve` | Start the local document server. |
|
||||
@@ -19,7 +19,7 @@
|
||||
```javascript
|
||||
rendererPlugin({
|
||||
nodeIntegration: true
|
||||
})
|
||||
});
|
||||
```
|
||||
|
||||
欲了解更多信息,请参阅以下文章: https://github.com/electron-vite/vite-plugin-electron-renderer
|
||||
@@ -9,24 +9,24 @@ order: 3
|
||||
|
||||
## 一般情况
|
||||
|
||||
| 脚本名称 | 说明 |
|
||||
| --- | --- |
|
||||
| `dev` | 启动电子作为开发环境 |
|
||||
| `dev:debug` | 将 Electron 作为开发环境启动(使用 vite debug) |
|
||||
| `dev:debug:force` | 以Electron作为开发环境启动(使用vite调试+清理vite缓存) |
|
||||
| `build:pre` | 通常在编译时运行的命令。此脚本无需单独运行。 |
|
||||
| `build` | 为当前操作系统打包。 |
|
||||
| `build:all` | 为整个操作系统构建指定软件包(需要跨平台构建配置) |
|
||||
| `build:dir` | `electron-builder`目录构建 |
|
||||
| `build:mac` | 为macOS构建预配置软件包 |
|
||||
| `build:linux` | 为Linux构建预配置软件包 |
|
||||
| `build:win` | 为Windows构建预配置软件包 |
|
||||
| `lint` | ESLint代码检查。它不会修改代码。 |
|
||||
| `lint:fix` | ESLint代码检查。使用自动修复功能修复代码。 |
|
||||
| `format` | 更漂亮的代码检查。它不会修改代码。 |
|
||||
| `format:fix` | 更漂亮的代码检查。使用自动修复功能修复代码。 |
|
||||
| `test` | 根据测试规范文件构建测试包并运行测试。 |
|
||||
| `test:linux` | 根据测试规范文件构建测试包并运行测试。(仅适用于linux ci) |
|
||||
| 脚本名称 | 说明 |
|
||||
| ----------------- | ---------------------------------------------------------- |
|
||||
| `dev` | 启动电子作为开发环境 |
|
||||
| `dev:debug` | 将 Electron 作为开发环境启动(使用 vite debug) |
|
||||
| `dev:debug:force` | 以Electron作为开发环境启动(使用vite调试+清理vite缓存) |
|
||||
| `build:pre` | 通常在编译时运行的命令。此脚本无需单独运行。 |
|
||||
| `build` | 为当前操作系统打包。 |
|
||||
| `build:all` | 为整个操作系统构建指定软件包(需要跨平台构建配置) |
|
||||
| `build:dir` | `electron-builder`目录构建 |
|
||||
| `build:mac` | 为macOS构建预配置软件包 |
|
||||
| `build:linux` | 为Linux构建预配置软件包 |
|
||||
| `build:win` | 为Windows构建预配置软件包 |
|
||||
| `lint` | ESLint代码检查。它不会修改代码。 |
|
||||
| `lint:fix` | ESLint代码检查。使用自动修复功能修复代码。 |
|
||||
| `format` | 更漂亮的代码检查。它不会修改代码。 |
|
||||
| `format:fix` | 更漂亮的代码检查。使用自动修复功能修复代码。 |
|
||||
| `test` | 根据测试规范文件构建测试包并运行测试。 |
|
||||
| `test:linux` | 根据测试规范文件构建测试包并运行测试。(仅适用于linux ci) |
|
||||
|
||||
## 文档
|
||||
|
||||
|
||||
Reference in new issue
Block a user