Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add umi template #1408

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Conversation

kiner-tang
Copy link
Contributor

@kiner-tang kiner-tang commented Jul 13, 2024

Summary by CodeRabbit

  • 新功能

    • 添加了一个新的 Umi 项目模板,包括配置文件和一些基本页面及布局。
    • 新增了导航栏,包含“首页”、“文档”和 GitHub 链接。
    • 新增了一个简单的“文档”页面,显示一段文本。
    • 新增了一个“首页”页面,显示欢迎信息及入门指南。
  • 样式

    • 为导航元素添加了基本的样式规则。
  • 配置

    • 配置了 .gitignore 和 .npmrc 文件以忽略不需要的文件和设置 NPM 注册表。
    • 添加了 tsconfig.json 和 typings.d.ts 文件进行 TypeScript 配置和类型定义导入。

Copy link
Contributor

coderabbitai bot commented Jul 13, 2024

Walkthrough

本次更新为 Umi 项目模板新增了一系列文件,包括用于配置的 .gitignore.npmrc 文件,UmiJS 配置文件 .umirc.ts,以及基本的页面和布局组件。同时,新增了 TypeScript 配置文件 tsconfig.json 和类型定义文件 typings.d.ts。这些改动旨在为 Umi 项目提供一个基本的开发模板,涵盖了项目的基本配置、脚本和样式。

Changes

文件路径 变更摘要
.../umi/.gitignore 新增 .gitignore 文件,设置项目目录和文件忽略规则。
.../umi/.npmrc 新增 .npmrc 文件,指定 NPM 仓库 URL。
.../umi/.umirc.ts 新增 .umirc.ts 文件,定义 UmiJS 的路由和 npmClient 配置。
.../umi/package.json 新增 package.json 文件,配置项目的依赖和脚本。
.../umi/src/layouts/index.less 新增 index.less 文件,定义导航元素的样式规则。
.../umi/src/layouts/index.tsx 新增 index.tsx 文件,创建导航栏和内容展示的布局组件。
.../umi/src/pages/docs.tsx 新增 docs.tsx 文件,创建一个简单的文档页面组件。
.../umi/src/pages/index.tsx 新增 index.tsx 文件,创建一个欢迎页面组件。
.../umi/tsconfig.json 新增 tsconfig.json 文件,扩展配置文件。
.../umi/typings.d.ts 新增 typings.d.ts 文件,导入 Umi 的类型定义。

Poem

在代码的田野里,
兔子挥动小键盘,
配置文件齐整齐,
页面组件闪光亮,
Umi 项目新起航,
开发之路共辉煌。


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

Copy link
Contributor

@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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d11e50f and 6f4bd5a.

Files ignored due to path filters (1)
  • packages/create-mako/templates/umi/src/assets/yay.jpg is excluded by !**/*.jpg
Files selected for processing (10)
  • packages/create-mako/templates/umi/.gitignore (1 hunks)
  • packages/create-mako/templates/umi/.npmrc (1 hunks)
  • packages/create-mako/templates/umi/.umirc.ts (1 hunks)
  • packages/create-mako/templates/umi/package.json (1 hunks)
  • packages/create-mako/templates/umi/src/layouts/index.less (1 hunks)
  • packages/create-mako/templates/umi/src/layouts/index.tsx (1 hunks)
  • packages/create-mako/templates/umi/src/pages/docs.tsx (1 hunks)
  • packages/create-mako/templates/umi/src/pages/index.tsx (1 hunks)
  • packages/create-mako/templates/umi/tsconfig.json (1 hunks)
  • packages/create-mako/templates/umi/typings.d.ts (1 hunks)
Files skipped from review due to trivial changes (10)
  • packages/create-mako/templates/umi/.gitignore
  • packages/create-mako/templates/umi/.npmrc
  • packages/create-mako/templates/umi/.umirc.ts
  • packages/create-mako/templates/umi/package.json
  • packages/create-mako/templates/umi/src/layouts/index.less
  • packages/create-mako/templates/umi/src/layouts/index.tsx
  • packages/create-mako/templates/umi/src/pages/docs.tsx
  • packages/create-mako/templates/umi/src/pages/index.tsx
  • packages/create-mako/templates/umi/tsconfig.json
  • packages/create-mako/templates/umi/typings.d.ts

@sorrycc sorrycc merged commit 3703fab into umijs:master Jul 15, 2024
8 checks passed
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