Skip to content

Conversation

@zzcr
Copy link
Member

@zzcr zzcr commented Apr 21, 2025

更新清理构建命令以包含缺失的目录,添加全局的cursor-rules

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Chores
    • Added new configuration files for global and product documentation rules.
    • Updated the build cleanup script to adjust which directories are removed during the clean process.

@coderabbitai
Copy link

coderabbitai bot commented Apr 21, 2025

Walkthrough

Two new markdown configuration files, .cursor/rules/global.mdc and .cursor/rules/product.mdc, were introduced to define global and product-specific rules or guidelines. The global file sets a professional standard for front-end development, while the product file provides concise documentation guidelines. Additionally, the clean:build script in package.json was updated to modify the directories being cleaned, replacing packages/dist2.7 with packages/utils/dist and packages/vue-hooks/dist.

Changes

File(s) Change Summary
.cursor/rules/global.mdc Added a new global rule file with metadata and a description emphasizing professional front-end development.
.cursor/rules/product.mdc Added a new product rule file with documentation guidelines and configuration metadata.
package.json Modified the clean:build script to update the directories being removed, targeting new build output locations.

Poem

In the warren of code, new rules now appear,
For docs and for builds, the intent is clear.
Sweep out the old, let the new paths be found,
With guidelines for clarity and code that’s renowned.
A hop and a skip, the rabbit’s delight—
Clean scripts and good docs make everything right!
🐇✨

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the bug Something isn't working label Apr 21, 2025
@github-actions
Copy link

[e2e-test-warn]
The component to be tested is missing.

The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug".

Please make sure you've read our contributing guide

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
.cursor/rules/global.mdc (2)

1-5: Define description and globs for clarity
The frontmatter fields description and globs are currently empty. To ensure this rule is properly documented and applied, please provide a concise description and specify the file patterns it should match. For example:

description: "Professional guidelines for senior front-end developers"
globs:
  - "packages/**/*.vue"

7-7: Review content language consistency
The rule content is written in Chinese. If the project is intended for a multilingual audience, consider adding an English translation or noting that rules are maintained in Chinese. This will help contributors understand and apply the rule correctly.

.cursor/rules/product.mdc (2)

2-4: Specify globs and enhance description
Similar to the global rules file, the globs field is empty. Please document which files this rule should apply to and consider elaborating on the description. For example:

description: "Guidelines for writing product requirements and development documentation"
globs:
  - "docs/**/*.md"

9-10: Fix a minor typo in the guideline text
There's a small typo in the first bullet point: "易懂一写" should be "易懂".

- - 需求尽量写的简单清晰易懂一写
+ - 需求尽量写的简单清晰易懂
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b6f894 and debc460.

📒 Files selected for processing (3)
  • .cursor/rules/global.mdc (1 hunks)
  • .cursor/rules/product.mdc (1 hunks)
  • package.json (1 hunks)

"lint": "eslint \"packages/**/{*.vue,*.js,*.ts}\" --quiet --fix",
"lint:doc": "eslint \"examples/**/{*.vue,*.js,*.ts}\" --quiet --fix",
"clean:build": "rimraf packages/dist2 packages/dist3 packages/dist2.7 packages/renderless/dist packages/theme/dist packages/theme-saas/dist",
"clean:build": "rimraf packages/dist2 packages/dist3 packages/utils/dist packages/vue-hooks/dist packages/renderless/dist packages/theme/dist packages/theme-saas/dist",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify and optionally refactor the clean:build script
Confirm that the newly added directories (packages/utils/dist and packages/vue-hooks/dist) actually exist in the repo and that no other build artifacts are missing from cleanup. Test the script locally to ensure it fails fast on missing paths. For improved maintainability, consider splitting the long rimraf command:

- "clean:build": "rimraf packages/dist2 packages/dist3 packages/utils/dist packages/vue-hooks/dist packages/renderless/dist packages/theme/dist packages/theme-saas/dist",
+ "clean:build": "rimraf \\
+   packages/dist2 \\
+   packages/dist3 \\
+   packages/utils/dist \\
+   packages/vue-hooks/dist \\
+   packages/renderless/dist \\
+   packages/theme/dist \\
+   packages/theme-saas/dist",

🏁 Script executed:

#!/usr/bin/env bash
# Verification script for clean:build paths
for dir in packages/utils/dist packages/vue-hooks/dist; do
  if [ ! -d "$dir" ]; then
    echo "Error: Directory not found: $dir"
    exit 1
  fi
done
echo "Success: All specified directories exist"

Length of output: 207


🏁 Script executed:

#!/usr/bin/env bash
# List all dist directories under packages/
echo "=== All dist directories under packages ==="
find packages -type d | grep '/dist' || true

# Locate actual utils and vue-hooks packages (and their dist subdirs if any)
echo -e "\n=== Packages matching utils or vue-hooks ==="
find packages -maxdepth 3 -type d | grep -E 'packages/(utils|vue-hooks)' || true

Length of output: 1511


Fix invalid cleanup paths in clean:build
The directories packages/utils/dist and packages/vue-hooks/dist do not exist in this repo. Please remove or correct these entries—either update your packages to emit a dist folder or drop them from the cleanup script.

• File: package.json, script clean:build
• Lines: ~100

Suggested diff:

--- a/package.json
+++ b/package.json
@@ -100,7 +100,6 @@
-    "clean:build": "rimraf packages/dist2 packages/dist3 packages/utils/dist packages/vue-hooks/dist packages/renderless/dist packages/theme/dist packages/theme-saas/dist",
+    "clean:build": "rimraf packages/dist2 packages/dist3 packages/renderless/dist packages/theme/dist packages/theme-saas/dist",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"clean:build": "rimraf packages/dist2 packages/dist3 packages/utils/dist packages/vue-hooks/dist packages/renderless/dist packages/theme/dist packages/theme-saas/dist",
"clean:build": "rimraf packages/dist2 packages/dist3 packages/renderless/dist packages/theme/dist packages/theme-saas/dist",

@zzcr zzcr changed the title fix(package.json): update clean build command to include missing directories, add global cursor-rules chore(package.json): update clean build command to include missing directories, add global cursor-rules Apr 21, 2025
@github-actions github-actions bot added chore and removed bug Something isn't working labels Apr 21, 2025
@zzcr zzcr removed the chore label Apr 21, 2025
@zzcr zzcr merged commit b0aaef7 into dev Apr 21, 2025
16 checks passed
@zzcr zzcr deleted the update-clean-build-0421 branch April 21, 2025 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants