Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 785650a2
authored
Feb 11, 2026
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 脚本工具包格式处理
1 parent
dc8573f3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
docs/guide/structure.md
internal/lint-configs/commitlint-config/index.mjs
scripts/build/buildToRoot.mjs
docs/guide/structure.md
0 → 100644
View file @
785650a
File mode changed
internal/lint-configs/commitlint-config/index.mjs
View file @
785650a
/*
/*
commitlint-config/index.mjs
commitlint-config/index.mjs
目的:配置 commitlint(cz-git)以强制仓库的 commit message 规范。
目的:配置 commitlint(cz-git)以强制仓库的 commit message 规范。
关键点:
关键点:
- 使用 conventional commits 作为基础以支持自动化 changelog/release
- 使用 conventional commits 作为基础以支持自动化 changelog/release
- 通过插件和脚本动态生成 scope 白名单(基于 monorepo packages)
- 通过插件和脚本动态生成 scope 白名单(基于 monorepo packages)
- 为交互式提交提示提供别名/默认值以降低误提交成本
- 为交互式提交提示提供别名/默认值以降低误提交成本
注意:该文件通过读取 git 状态来尝试预填充 scope(提高体验)。
注意:该文件通过读取 git 状态来尝试预填充 scope(提高体验)。
*/
*/
...
...
scripts/build/buildToRoot.mjs
View file @
785650a
...
@@ -16,13 +16,13 @@ import { join } from "node:path";
...
@@ -16,13 +16,13 @@ import { join } from "node:path";
const rootDir = process.cwd();
const rootDir = process.cwd();
const rootDistDir = join(rootDir, "dist");
const rootDistDir = join(rootDir, "dist");
const PACKAGE_SEARCH_PATHS = [
const PACKAGE_SEARCH_PATHS = [
[
"apps", "web", "venus-agentic"
],
[
"apps", "web", "venus-agentic"
],
[
"apps", "web"
],
[
"apps", "web"
],
[
"apps", "frontend-micro"
],
[
"apps", "frontend-micro"
],
[
"apps", "frontend", "vue"
],
[
"apps", "frontend", "vue"
],
[
"apps"
],
[
"apps"
],
[
"packages"
],
[
"packages"
],
[
"docs"
],
[
"docs"
],
];
];
// ==================== 构建配置开关 ====================
// ==================== 构建配置开关 ====================
...
@@ -83,7 +83,7 @@ function cleanRootDist() {
...
@@ -83,7 +83,7 @@ function cleanRootDist() {
*/
*/
async function findPackagePath(packageName) {
async function findPackagePath(packageName) {
const cleanName = packageName.replace("@venus/", "");
const cleanName = packageName.replace("@venus/", "");
const nameVariants = new Set([
`@venus/${cleanName}`, cleanName, packageName
]);
const nameVariants = new Set([
`@venus/${cleanName}`, cleanName, packageName
]);
for (const pathSegments of PACKAGE_SEARCH_PATHS) {
for (const pathSegments of PACKAGE_SEARCH_PATHS) {
const packagePath = join(rootDir, ...pathSegments, cleanName);
const packagePath = join(rootDir, ...pathSegments, cleanName);
...
@@ -121,7 +121,7 @@ async function shouldInstallDeps(packageName) {
...
@@ -121,7 +121,7 @@ async function shouldInstallDeps(packageName) {
if (!existsSync(packageJsonPath) || !existsSync(pnpmLockPath)) return true;
if (!existsSync(packageJsonPath) || !existsSync(pnpmLockPath)) return true;
try {
try {
const [
packageJsonTime, lockTime, nodeModulesTime
] = [
const [
packageJsonTime, lockTime, nodeModulesTime
] = [
statSync(packageJsonPath).mtime,
statSync(packageJsonPath).mtime,
statSync(pnpmLockPath).mtime,
statSync(pnpmLockPath).mtime,
statSync(nodeModulesPath).mtime,
statSync(nodeModulesPath).mtime,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment