Skip to content

Commit

Permalink
docs: bump Rspress v1.18.2 and remove dividers (#5662)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
chenjiahan and github-actions[bot] committed Apr 19, 2024
1 parent 46c8884 commit bfba084
Show file tree
Hide file tree
Showing 12 changed files with 250 additions and 200 deletions.
7 changes: 7 additions & 0 deletions .changeset/bright-planets-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/builder-doc': patch
'@modern-js/module-tools-docs': patch
'@modern-js/main-doc': patch
---

docs: bump Rspress v1.18.2 and remove dividers
4 changes: 2 additions & 2 deletions packages/document/builder-doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
},
"devDependencies": {
"@modern-js/tsconfig": "workspace:*",
"rspress": "1.16.0",
"rspress": "1.18.2",
"@types/node": "^14",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@rspress/shared": "1.16.0"
"@rspress/shared": "1.18.2"
}
}
8 changes: 0 additions & 8 deletions packages/document/main-doc/docs/en/community/blog/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Welcome to Modern.js blog!

You can find the latest update of Modern.js and our thought processes here. Occasionally we explain the infrastructure behind it.

---

## Announcing Modern.js v2: support Rspack

> Published on 16.03.2023
Expand All @@ -20,8 +18,6 @@ Modern.js is a suite of infrastructure tools we built for web development inside

We are extremely proud of what we have achieved so far, you can also refer to [this article(English version under construction)](/community/blog/v2-release-note)👈🏻 to see what has changed over the last year in Modern.js.

---

## What is Streaming SSR in React 18

> Published on 16.12.2022
Expand All @@ -36,8 +32,6 @@ To understand its design further, check out this [Github Discussion](https://git

Or read more from us at [here(Further content in English under construction)](https://mp.weixin.qq.com/s/w4FS5sBcHqRl-Saqi19Y6g).

---

## Introducing React Server Component in Modern.js

> Published on 01.12.2022
Expand All @@ -59,8 +53,6 @@ We updated Modern.js to v1.21.0 during Sept - Oct. Major upgrade includes:

[Read more (English version under construction)](/community/blog/2022-0910-updates)

---

## Updates during July - August in 2022

> Published on 2022.09.05
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ sidebar_position: 3

Thanks for that you are interested in contributing to Modern.js. Before starting your contribution, please take a moment to read the following guidelines.

---

## Setup the Dev Environment

### Fork the Repo
Expand Down Expand Up @@ -81,8 +79,6 @@ Set the email for local repo:
git config user.email "SOME_EMAIL@example.com"
```

---

## Making Changes and Building

Once you have set up the local development environment in your forked repo, we can start development.
Expand Down Expand Up @@ -123,8 +119,6 @@ If you need to clean all `node_modules/*` in the project, run the `reset` comman
pnpm run reset
```

---

## Testing

### Add New Tests
Expand Down Expand Up @@ -164,8 +158,6 @@ If you need to run a specified test, you can add keywords to filter:
npx jest copy-assets
```

---

## Linting

To help maintain consistency and readability of the codebase, we use a ESLint to lint the codes.
Expand All @@ -176,8 +168,6 @@ You can run the Linter by executing the following command:
pnpm run lint
```

---

## Benchmarking

You can input `!bench-framework` or `!bench-module` in the comment area of ​​the PR to do benchmarking on `@modern-js/app-tools` and `@modern-js/module-tools` respectively (you need to have Collaborator and above permissions).
Expand All @@ -186,8 +176,6 @@ You can focus on metrics related to build time and bundle size based on the comp

Dependencies installation-related metrics base on publishing process, so the data is relatively lagging and is for reference only.

---

## Documentation

Currently Modern.js provides documentation in English and Chinese. If you can use Chinese, please update both documents at the same time. Otherwise, just update the English documentation.
Expand All @@ -207,8 +195,6 @@ This website is built with Rspress, the document content can be written using ma

The source code of Rspress can be found in [this repo](https://github.com/web-infra-dev/rspress).

---

## Submitting Changes

### Add a Changeset
Expand Down Expand Up @@ -239,8 +225,6 @@ feat(plugin-swc): Add `xxx` config
|____________ Type
```

---

## Publishing

We use **Modern.js Monorepo Solution** to manage version and changelog.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,129 +8,97 @@ The Modern.js framework comes with built-in popular libraries and development to

In this document, you can learn about the main technology stack involved in the Modern.js framework, as well as some optional libraries and tools.

---

## UI Library

Modern.js uses [React 18](https://react.dev/) to build user interfaces and is also compatible with React 17.

Rsbuild supports building Vue applications. If you need to use Vue, you can refer to ["Rsbuild - Vue"](https://rsbuild.dev/guide/framework/vue3).

---

## Routing

Modern.js uses [React Router 6](https://reactrouter.com/en/main) for routing and is also compatible with React Router 5.

Modern.js supports conventional routing, self-controlled routing, or other routing schemes. Please refer to ["Routing"](/en/guides/basic-features/routes) to make your choice.

---

## Micro Frontends

Modern.js provides out-of-the-box support for the [Garfish](https://www.garfishjs.org/) micro frontend framework.

We are also working with Zack Jackson, the author of [Module Federation](https://webpack.js.org/concepts/module-federation/), to provide a more comprehensive solution.

---

## State Management

Modern.js can be used with any community state management library, such as [Redux](https://redux.js.org/), [Jotai](https://jotai.org/), [Zustand](https://docs.pmnd.rs/zustand), [Valtio](https://valtio.pmnd.rs/), and more.

Modern.js also provides a wrapper around Redux called Reduck for state management. You can refer to ["Reduck State Management"](/en/guides/topic-detail/model/quick-start) for usage.

---

## Package Manager

Modern.js can be used with any community package manager, such as [npm](https://www.npmjs.com/package/npm), [yarn](https://classic.yarnpkg.com/lang/en/), [pnpm](https://pnpm.io/), or [Bun](https://bun.sh/).

We recommend using pnpm for faster installation speed.

---

## Bundler

Modern.js uses [Webpack 5](https://webpack.js.org/) or [Rspack](https://www.rspack.dev/) to bundle your web applications.

The default bundler used is Webpack 5. You can refer to ["Using Rspack"](/en/guides/advanced-features/rspack-start) to switch to the faster Rspack.

---

## Transpiler

Modern.js uses [Babel](https://babeljs.io/), [SWC](https://swc.rs/), or [esbuild](https://esbuild.github.io/) as JavaScript transpiler to transform TypeScript or JSX into JavaScript code that can run in browsers and perform syntax downgrades.

- When using Webpack for bundling, the default tool is Babel, which can be switched to SWC or esbuild.
- When using Rspack for bundling, the default tool is SWC, which can be switched to Babel.

---

## Minimizer

During production builds, Modern.js uses [Terser](https://github.com/terser/terser), [SWC](https://swc.rs/), or [esbuild](https://esbuild.github.io/) to minify JavaScript code, and [cssnano](https://cssnano.co/) to minify CSS code.

- When using Webpack for bundling, the default tool for minifying JS code is Terser, which can be switched to SWC or esbuild.
- When using Rspack for bundling, the default tool for minifying JS code is SWC, and switching to other tools is not currently supported.

---

## CSS Transformer

Modern.js uses [PostCSS](https://postcss.org/) to transform CSS code and enables [autoprefixer](https://github.com/postcss/autoprefixer) by default to add CSS prefixes.

Modern.js supports enabling ["Tailwind CSS"](/en/guides/basic-features/css.html#using-tailwind-css) and is compatible with both Tailwind CSS v2 and v3.

---

## CSS Preprocessors

Modern.js supports three CSS preprocessors: [Sass](https://sass-lang.com/), [Less](https://lesscss.org/), and [Stylus](https://stylus-lang.com/):

- Sass and Less are supported by default and ready to use.
- Stylus is optional and can be used by referring to the ["Stylus Plugin"](https://rsbuild.dev/plugins/list/plugin-stylus).

---

## CSS Modules

Modern.js provides out-of-the-box support for [CSS Modules](https://github.com/css-modules/css-modules), which is implemented internally based on [css-loader](https://www.npmjs.com/package/css-loader).

Please refer to ["Use CSS Modules"](/guides/basic-features/css-modules) for usage instructions.

---

## CSS-in-JS

Modern.js supports the use of [styled-components](https://styled-components.com/). Please refer to ["Using CSS-in-JS"](/en/guides/basic-features/css.html#using-css-in-js) for usage instructions.

If you need to use other CSS-in-JS solutions, you can integrate them into your project on your own.

---

## Testing Framework

Modern.js supports the use of [Jest](https://jestjs.io/) for unit testing or integration testing. This feature is optional. Please refer to ["Using Jest"](/en/guides/advanced-features/testing) to enable it.

If you need to use [Vitest](https://vitest.dev/) or other testing frameworks, you can integrate them into your project on your own.

---

## UI Components

Modern.js can be used with any React UI component library from the community, such as [MUI](https://mui.com/), [Ant Design](https://ant.design/), [Arco Design](https://github.com/arco-design/arco-design), [Semi Design](https://semi.design/), [Radix UI](https://www.radix-ui.com/), and more.

Additionally, Modern.js provides built-in support for [on-demand import](/configure/app/source/transform-import) of Ant Design and Arco Design.

---

## Component Development

Modern.js supports the use of [Storybook](https://storybook.js.org/) for developing UI components. This feature is optional. Please refer to ["Using Storybook"](/en/guides/advanced-features/using-storybook) to enable it.

---

## Node.js Framework

import TechStackNodeFramework from '@site-docs-en/components/tech-stack-node-framework';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 2
---

## Introduction
# Introduction

There are two types of generator plugin:

Expand Down
12 changes: 0 additions & 12 deletions packages/document/main-doc/docs/zh/community/blog/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ sidebar_position: 1

在这里,你可以了解到 Modern.js 的最新进展和技术分享。

---

## AIGC 如何影响下一代文档搜索方案?

> 发表于 2023.05.11
Expand All @@ -18,8 +16,6 @@ sidebar_position: 1

[了解更多 →](https://mp.weixin.qq.com/s/OGuixAbvbIYr2viQrOrPXg)

---

## Modern.js v2 发布:支持 Rspack 构建

> 发表于 2023.03.16
Expand All @@ -32,8 +28,6 @@ Modern.js 是字节跳动 Web Infra 团队开源的一套 Web 工程体系。在

[了解更多 →](/community/blog/v2-release-note)

---

## React Streaming SSR 原理解析

> 发表于 2022.12.16
Expand All @@ -45,8 +39,6 @@ React 18 提供了一种新的 SSR 渲染模式: Streaming SSR。通过 Stream

[了解更多 →](https://mp.weixin.qq.com/s/w4FS5sBcHqRl-Saqi19Y6g)

---

## React Server Component 介绍

> 发表于 2022.12.01
Expand All @@ -57,8 +49,6 @@ React 官方对 Server Component 是这样介绍的: **zero-bundle-size React Se

[了解更多 →](https://mp.weixin.qq.com/s/B-XLvW00vl5RE1Ur3EW4ow)

---

## 2022 年 9 ~ 10 月更新内容

> 发表于 2022.11.01
Expand All @@ -70,8 +60,6 @@ Modern.js 9 ~ 10 月的最新版本为 v1.21.0,本双月的主要更新有:

[了解更多 →](/community/blog/2022-0910-updates)

---

## 2022 年 7 ~ 8 月更新内容

> 发表于 2022.09.05
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ sidebar_position: 3

感谢你有兴趣为 Modern.js 做贡献!在开始你的贡献之前,请花几分钟时间阅读以下指南。

---

## 设置开发环境

### Fork 仓库
Expand Down Expand Up @@ -80,8 +78,6 @@ git config --global user.email "SOME_EMAIL@example.com"
git config user.email "SOME_EMAIL@example.com"
```

---

## 代码变更和构建

当你在 fork 的仓库中设置完本地开发环境后,我们就可以开始开发了。
Expand Down Expand Up @@ -122,8 +118,6 @@ pnpm run prepare
pnpm run reset
```

---

## 测试

### 添加新测试
Expand Down Expand Up @@ -163,8 +157,6 @@ pnpm run test:e2e
npx jest copy-assets
```

---

## Linting

为了帮助保持代码风格的一致性和可读性,我们使用 ESLint 对代码进行校验。
Expand All @@ -175,8 +167,6 @@ npx jest copy-assets
pnpm run lint
```

---

## Benchmarking

你可以在 PR 的评论区中输入 `!bench-framework``!bench-module` 分别对 `@modern-js/app-tools``@modern-js/module-tools` 做性能测试(这需要你具有 Collaborator 及以上的权限)。
Expand All @@ -185,8 +175,6 @@ pnpm run lint

依赖安装相关指标由于需要前置的发包流程,因此数据相对有滞后性,仅供参考。

---

## 文档

目前 Modern.js 提供英文和中文文档。如果你熟悉中文,请同时更新中英文文档。否则,只需更新英文文档即可。
Expand All @@ -206,8 +194,6 @@ root

Rspress 的源代码可以在 [这个仓库](https://github.com/web-infra-dev/rspress) 中找到。

---

## 提交变更

### 添加 Changeset
Expand Down Expand Up @@ -238,8 +224,6 @@ feat(plugin-swc): 添加 `xxx` 配置项
|____________ 类型
```

---

## 发布

Modern.js 使用 [Changesets](https://github.com/changesets/changesets) 来管理版本和 changelog。
Expand Down

0 comments on commit bfba084

Please sign in to comment.