Skip to content

Commit

Permalink
docs: unify title capitalization style (#8973)
Browse files Browse the repository at this point in the history
* docs: unify title capitalization style

* docs: update

* fix

* fix
  • Loading branch information
chenjiahan authored Jan 8, 2025
1 parent 6c9d26e commit 203b7e9
Show file tree
Hide file tree
Showing 102 changed files with 328 additions and 333 deletions.
14 changes: 7 additions & 7 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributor Covenant Code of Conduct
# Contributor covenant code of conduct

## Our Pledge
## Our pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
Expand All @@ -12,7 +12,7 @@ and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards
## Our standards

Examples of behavior that contributes to a positive environment for our
community include:
Expand All @@ -36,7 +36,7 @@ Examples of unacceptable behavior include:
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
## Enforcement responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
Expand Down Expand Up @@ -65,7 +65,7 @@ All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines
## Enforcement guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
Expand All @@ -91,7 +91,7 @@ includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban
### 3. Temporary ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
Expand All @@ -102,7 +102,7 @@ private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban
### 4. Permanent ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rspack Contributing Guide
# Rspack contributing guide

Thank you for your interest in contributing to Rspack! There are many ways to contribute, and we appreciate all of them.

Expand All @@ -14,7 +14,7 @@ The Rspack team believe that creating a development guide for Rspack is a great
By providing clarity and consistency, lowering barriers to entry, building trust, and encouraging collaboration,
we can create a strong and thriving open source project that people will want to contribute to.

## Documentation Contribution
## Documentation contribution

See [documentation](./website/README.md).

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ Rspack is a high performance JavaScript bundler written in Rust. It offers stron

Read [Introduction](https://rspack.dev/guide/start/introduction) for details.

## Getting Started
## Getting started

See [Quick Start](https://rspack.dev/guide/start/quick-start).
See [Quick start](https://rspack.dev/guide/start/quick-start).

## Contribution

Please read the [contributing guide](./CONTRIBUTING.md) and let's build Rspack together.

### Code of Conduct
### Code of conduct

This repo has adopted the ByteDance Open Source Code of Conduct. Please check [Code of Conduct](./CODE_OF_CONDUCT.md) for more details.
This repo has adopted the ByteDance Open Source Code of Conduct. Please check [Code of conduct](./CODE_OF_CONDUCT.md) for more details.

## Community

Expand Down
10 changes: 8 additions & 2 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rspack Documentation
# Rspack documentation

📄 Documentation for Rspack.

Expand All @@ -21,7 +21,13 @@ The source code of Rspress can be found in [this folder](https://github.com/web-

If you have any problems using the Rspress, please create a new issue at [Rspress Issues](https://github.com/web-infra-dev/rspress/issues).

## Image Assets
## Writing style guide

- **Capitalization style**: page titles and section headings should use sentence-style capitalization (only capitalize the first word and proper nouns) rather than title-style capitalization:
- Correct: "A new method for creating JavaScript rollovers"
- Incorrect: "A New Method for Creating JavaScript Rollovers"

## Image assets

For images you use in the document, it's better to upload them to the [rspack-contrib/rstack-design-resources](https://github.com/rspack-contrib/rstack-design-resources) repository, so the size of the current repository doesn't get too big.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/api/cli.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Command Line Interface (CLI)
# Command line interface (CLI)

[@rspack/cli](https://npmjs.com/package/@rspack/cli) provides two common subcommands, serve and build, to simplify daily work. If you do not have @rspack/cli installed, please read the [Quick Start](/guide/start/quick-start) section first.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Command Line Interface (CLI) to configure and interact with your build. It i

## Runtime API

When processing modules with rspack, it is important to understand the different module syntaxes – specifically the methods and variables - that are supported. And also the runtime Hot Module Replacement (HMR) improves the development experience by updating modules in the browser at runtime without needing a whole page refresh.
When processing modules with rspack, it is important to understand the different module syntaxes – specifically the methods and variables - that are supported. And also the runtime HMR improves the development experience by updating modules in the browser at runtime without needing a whole page refresh.

[Learn more about the Runtime API!](/api/runtime-api/module-methods)

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/api/loader-api/context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import WebpackLicense from '@components/WebpackLicense';

<WebpackLicense from="https://webpack.js.org/api/loaders/#the-loader-context" />

# The Loader Context
# Loader context

The loader context represents the properties that are available inside of a loader assigned to the `this` property.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/api/loader-api/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Overview

## Compatibility Status
## Compatibility status

Rspack is committed to being compatible with the loaders within the webpack ecosystem. We ensure that Rspack is as compatible as possible with the webpack loader API, allowing more existing webpack loaders to be directly used in Rspack.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/api/plugin-api/compilation-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Columns from '@components/Columns';
import { NoSSR } from 'rspress/runtime';
import { ApiMeta } from '@components/ApiMeta';

# Compilation Hooks
# Compilation hooks

:::info
The main compilation logic of Rspack runs on the Rust side. For factors such as stability, performance, and architecture, after the Rust side compilation objects are transferred to the JavaScript side when using hooks, the modifications on these objects will not be synchronized to the Rust side. Therefore, most of hooks are "read-only".
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/api/plugin-api/compiler-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Collapse, CollapsePanel } from '@components/Collapse';
import Columns from '@components/Columns';
import { NoSSR } from 'rspress/runtime';

# Compiler Hooks
# Compiler hooks

## Overview

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/api/plugin-api/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Compatibility Status
# Compatibility status

Rspack is committed to being compatible with the plugins within the webpack ecosystem. We ensure that Rspack is as compatible as possible with the webpack plugin API, allowing more existing webpack plugins to be directly used in Rspack.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/api/plugin-api/stats-hooks.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Stats Hooks
# Stats hooks

## StatsFactory

Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/api/runtime-api/hmr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import WebpackLicense from '@components/WebpackLicense';

<WebpackLicense from="https://webpack.js.org/api/hot-module-replacement/" />

# Hot Module Replacement
# Hot module replacement

Typically, users will check to see if the interface is accessible, then begin working with it. As an example, here's how you might `accept` an updated module:

Expand Down Expand Up @@ -142,7 +142,7 @@ When called during the `check` state, this module will be added to the update wh

When called during the `dispose` or `apply` state, HMR will pick it up after getting out of those states.

#### Use Cases
#### Use cases

**Conditional Accepting**

Expand Down
8 changes: 4 additions & 4 deletions website/docs/en/api/runtime-api/module-methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ApiMeta } from '@components/ApiMeta';

<WebpackLicense from="https://webpack.js.org/api/module-methods/" />

# Module Methods
# Module methods

This section covers all methods available in code compiled with Rspack. When using Rspack to bundle your application, you can pick from a variety of module syntax styles including [ES modules](https://nodejs.org/api/esm.html#modules-ecmascript-modules) and [CommonJS](https://nodejs.org/api/modules.html).

Expand All @@ -17,7 +17,7 @@ Actually Rspack would enforce the recommendation for `.mjs` files, `.cjs` files
- `.cjs` or `.js` with "type": "commonjs" in package.json
- Neither import nor export is available

## ES modules (Recommended)
## ES modules (recommended)

Rspack support ES modules syntax natively, you can use static `import`, `export` and `import()` syntax.

Expand Down Expand Up @@ -99,7 +99,7 @@ import(`./locale/${language}.json`).then(module => {
});
```

#### Magic Comments
#### Magic comments

<ApiMeta specific={['Rspack', 'Webpack']} />

Expand Down Expand Up @@ -360,7 +360,7 @@ if (module.hot) {
}
```

## Data URI Module
## Data URI module

Rspack supports importing Data URI modules using the `import` and `require` syntax.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/api/runtime-api/module-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ApiMeta } from '@components/ApiMeta';

<WebpackLicense from="https://webpack.js.org/api/module-variables/" />

# Module Variables
# Module variables

This section covers all variables available in code compiled with Rspack. Modules will be able to access specific data from the compilation process through `module` and other variables.

Expand All @@ -24,7 +24,7 @@ module.id === require.resolve('./src/main.js'); // true

### module.hot

Indicates whether or not Hot Module Replacement is enabled and provides an interface to the process. See the [HMR API page](/api/runtime-api/hmr) for details.
Indicates whether or not hot module replacement is enabled and provides an interface to the process. See the [HMR API page](/api/runtime-api/hmr) for details.

### global

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/blog/announcing-0-1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Currently, Rspack is a project with performance as the core selling point, so in

### Build a quality assurance system

Webpack has already accumulated very rich test cases, and in the future Rspack will reuse the existing test cases of Webpack to improve its code coverage. Build a better CI system, and build an Ecosystem CI system with community projects to ensure that project upgrades do not cause breaks on upstream projects, to ensure long-term project health, and to ensure long-term increase in test coverage.
Webpack has already accumulated very rich test cases, and in the future Rspack will reuse the existing test cases of webpack to improve its code coverage. Build a better CI system, and build an Ecosystem CI system with community projects to ensure that project upgrades do not cause breaks on upstream projects, to ensure long-term project health, and to ensure long-term increase in test coverage.

## Trial

Expand Down
8 changes: 4 additions & 4 deletions website/docs/en/blog/announcing-0-2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ We look forward to you experiencing these new improvements in version 0.2, and w

Version 0.2 has completed compatibility with most of the loader APIs, including: inline match resource, pitching loader, and inline loader. More APIs have further improved compatibility with webpack loaders, details of which can be found in our webpack compatibility updates [Loader API](/api/loader-api/index).

### Plugin Hooks
### Plugin hooks

New hooks for plugins have been added.

Expand Down Expand Up @@ -106,7 +106,7 @@ module.exports = {
};
```

## Breaking Changes
## Breaking changes

- Alignment of Filename Generation Logic

Expand Down Expand Up @@ -144,7 +144,7 @@ module.exports = {

Details: https://github.com/web-infra-dev/rspack/pull/3358

## Webpack Compatibility Updates
## Webpack compatibility updates

As we support more webpack APIs, we are also compatible with more community plugins and loaders. We have adapted some plugins and loaders that have a high demand in the community.

Expand Down Expand Up @@ -192,7 +192,7 @@ Thanks to Rspack's excellent support for the Loader API and the excellent design

### Storybook

With the help of the Storybook team, Rspack has completed support for the Storybook React version. You can follow the [migrate Storybook](/guide/migration/storybook.html) method to migrate from the webpack version to the Rspack version. In actual projects, tests have shown that the Rspack version is 5-10 times faster than the Webpack version when the docgen feature is not turned on. When docgen is turned on, since Rspack still relies on babel to handle docgen, the performance is affected, but there is still a 2-3 times improvement.
With the help of the Storybook team, Rspack has completed support for the Storybook React version. You can follow the [migrate Storybook](/guide/migration/storybook.html) method to migrate from the webpack version to the Rspack version. In actual projects, tests have shown that the Rspack version is 5-10 times faster than the webpack version when the docgen feature is not turned on. When docgen is turned on, since Rspack still relies on babel to handle docgen, the performance is affected, but there is still a 2-3 times improvement.

### Angular

Expand Down
20 changes: 10 additions & 10 deletions website/docs/en/blog/announcing-0-3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar: false

> August 24, 2023
## Breaking Changes
## Breaking changes

In version 0.3, Rspack aligns the default CSS handling behavior with webpack when set `experiments.css = true`. This involves removing many built-in CSS transformation logic, which introduces some breaking changes. If your application previously relied on these transformation logic, please pay attention to the migration steps below.

Expand Down Expand Up @@ -60,7 +60,7 @@ module.exports = {
};
```

### Removal of Built-in CSS Autoprefixer Functionality
### Removal of built-in CSS autoprefixer functionality

To align better with webpack's CSS handling, Rspack removes the built-in autoprefixer functionality in 0.3. You can use `postcss-loader` to achieve `autoprefixer`.

Expand Down Expand Up @@ -89,7 +89,7 @@ module.exports = {

You can refer to the [examples/postcss-loader](https://github.com/rspack-contrib/rspack-examples/tree/main/rspack/postcss-loader/rspack.config.js) for a complete example.

### Access to Internal Modules Restricted
### Access to internal modules restricted

Due to the current instability of the internal module API in Rspack, directly accessing the internal modules can easily lead to breaking changes. Therefore, Rspack restricts the ability to directly access internal modules and only supports accessing Rspack's API from the root module.

Expand All @@ -105,9 +105,9 @@ import { Stats } from '@rspack/core/dist/stats'; // not supported since 0.3
import { Stats } from '@rspack/core';
```

## Major Feature Updates
## Major feature updates

### Web Workers Support
### Web Workers support

Rspack natively supports Web Workers, which means you can use Web Workers out of the box without using worker-loader. Here is how to use it:

Expand All @@ -120,7 +120,7 @@ new Worker(new URL('./worker.js', import.meta.url), {
For more information about web workers support, see [web workers](/guide/features/web-workers).
### `builtin:swc-loader` Support
### `builtin:swc-loader` support
Although Rspack provides many SWC compilation configuration options, these configurations are global and cannot fulfill the requirement of using different SWC transformation logic for different modules. Therefore, Rspack supports `builtin:swc-loader` to provide more fine-grained SWC transformation configuration. Compared to the JavaScript version of `swc-loader`, `builtin:swc-loader` has better performance. You can use `builtin:swc-loader` as follows:
Expand Down Expand Up @@ -161,7 +161,7 @@ module.exports = config;
You can refer to [examples/builtin-swc-loader](https://github.com/rspack-contrib/rspack-examples/tree/main/rspack/builtin-swc-loader) for more examples. Currently, `builtin:swc-loader` still has limitations, such as not supporting Wasm plugins, etc. Rspack will continue to iterate and support more features of `builtin:swc-loader` in future versions.
### Improved Profile Support
### Improved profile support
Performance optimization is a common requirement in business support. To reduce the cost of performance optimization for businesses, we have improved the experience of Rspack Profile. You can generate profile-related files for performance optimization by using the RSPACK_PROFILE environment variable.
Expand All @@ -180,14 +180,14 @@ Alignment with More APIs
- `rule.use` supports functions.
- Supports `configuration.profile`.
### More Hook and Plugin Support
### More hook and plugin support
Compared to version 0.2, we have implemented more plugin APIs and made compatibility improvements for more plugins in version 0.3. At the same time, we have refined the plugin API support progress of webpack, making the support progress of plugin APIs transparent. You can track the implementation progress of plugin APIs here: [plugin-api-progress](https://github.com/orgs/web-infra-dev/projects/9).
### Alignment with Webpack Architecture
### Alignment with webpack architecture
In version 0.3, we have further optimized the alignment with the webpack architecture, migrating from the original AST-based codegen architecture to the string transformation-based architecture. This alignment work further ensures that Rspack can align with more Hook APIs of webpack during the codegen stage to be compatible with more community plugins.
### Rspack Ecosystem
### Rspack ecosystem
Starting from version 0.2, Rspack provides support for vue-loader. However, creating a complete Vue.js CLI solution based on vue-loader can be a complex task. To simplify the development of Vue.js applications using Rspack, we offer the [Rsbuild](https://rsbuild.dev/), which is an out-of-the-box solution. This solution helps developers easily develop Vue.js applications using Rspack.
4 changes: 2 additions & 2 deletions website/docs/en/blog/announcing-0-4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ sidebar: false

> November 02, 2023
## Rspack 0.4 Major Changes
## Rspack 0.4 major changes

### Drop NodeJS 14 Support
### Drop Node.js 14 support

Rspack no longer supports Node.js 14, Node.js 16+ is now required.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/blog/announcing-0-5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import { PackageManagerTabs } from '@theme';

> January 09, 2024
## Major Feature Updates
## Major feature updates

### Module Federation added to Rspack

Checkout [this blog](/blog/module-federation-added-to-rspack) for more details.

## Breaking Changes
## Breaking changes

### optimization.chunkIds is deterministic in production mode by default

Expand Down
Loading

0 comments on commit 203b7e9

Please sign in to comment.