Skip to content

Commit

Permalink
docs: unify title capitalization style (#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Jan 11, 2025
1 parent 290040a commit ed6dd8d
Show file tree
Hide file tree
Showing 42 changed files with 115 additions and 111 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
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rslib Contributing Guide
# Rslib contributing guide

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

Expand All @@ -14,7 +14,7 @@ fnm use
nvm use
```

## Install Dependencies
## Install dependencies

Enable [pnpm](https://pnpm.io/) with corepack:

Expand All @@ -34,19 +34,19 @@ What this will do:
- Create symlinks between packages in the monorepo
- Run the prepare script to build all packages, powered by [nx](https://nx.dev/).

## Making Changes and Building
## Making changes and building

Once you have set up the local development environment in your forked repo, we can start development.

### Checkout A New Branch
### Checkout a new branch

It is recommended to develop on a new branch, as it will make things easier later when you submit a pull request:

```sh
git checkout -b MY_BRANCH_NAME
```

### Build the Package
### Build the package

Use [nx build](https://nx.dev/nx-api/nx/documents/run) to build the package you want to change:

Expand All @@ -68,13 +68,13 @@ npx nx build @rslib/core --watch

## Testing

### Add New Tests
### Add new tests

If you've fixed a bug or added code that should be tested, then add some tests.

You can add unit test cases in the `<PACKAGE_DIR>/tests` folder. The test runner is based on [Vitest](https://vitest.dev/).

### Run Unit Tests
### Run unit tests

Before submitting a pull request, it's important to make sure that the changes haven't introduced any regressions or bugs. You can run the unit tests for the project by executing the following command:

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Rslib has the following features:
- **Declaration file generation**: Including isolated declarations.
- **Advanced features**: Module Federation, asset compression, PostCSS, Lightning CSS, and more.

## 📚 Getting Started
## 📚 Getting started

To get started with Rslib, see the [Quick Start](https://lib.rsbuild.dev/guide/start/quick-start).

Expand Down Expand Up @@ -109,7 +109,7 @@ Please read the [Contributing Guide](https://github.com/web-infra-dev/rslib/blob
</table>
</a>

### 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.

Expand Down
2 changes: 1 addition & 1 deletion examples/module-federation/mf-remote/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A Module Federation remote module built with Rsbuild. It is consumed by [mf-reac

Extra remote module is **optional**, it is used to demonstrate a complex Module Federation set up here.

## Get Started
## Get started

Start the dev server:

Expand Down
4 changes: 2 additions & 2 deletions packages/create-rslib/template-common/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rslib Project
# Rslib project

## Setup

Expand All @@ -8,7 +8,7 @@ Install the dependencies:
pnpm install
```

## Get Started
## Get started

Build the library:

Expand Down
8 changes: 6 additions & 2 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Rslib Website
# Rslib website

This website is built with [Rspress](https://github.com/web-infra-dev/rspress), the document content can be written using markdown or mdx syntax. You can refer to the [Rspress Website](https://rspress.dev/) for detailed usage.

## Contributing

Currently Rslib 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.

### Image Assets
## Writing style guide

The same as Rspack: [Writing style guide](https://github.com/web-infra-dev/rspack/tree/main/website#writing-style-guide).

### 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/javascript-api/core.mdx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Rslib Core
# Rslib core
2 changes: 1 addition & 1 deletion website/docs/en/api/javascript-api/types.mdx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Rslib Types
# Rslib types
4 changes: 2 additions & 2 deletions website/docs/en/config/lib/auto-extension.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Whether to automatically set the file extension based on the [`format`](/config/lib/format) option in the JavaScript output files.

## Default Extension
## Default extension

By default that when `autoExtension` is set to `true`, the file extension will be:

Expand All @@ -15,7 +15,7 @@ By default that when `autoExtension` is set to `true`, the file extension will b

When `autoExtension` is set to `false`, the file extension will be default to `.js`.

## Customize Extension
## Customize extension

You can set `autoExtension` to `false` and use [output.filename](https://rsbuild.dev/config/output/filename) to customize the JavaScript output files.

Expand Down
8 changes: 4 additions & 4 deletions website/docs/en/config/lib/auto-external.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type AutoExternal =

Whether to automatically externalize dependencies of different dependency types and do not bundle them.

## Object Type
## Object type

### autoExternal.dependencies

Expand Down Expand Up @@ -59,7 +59,7 @@ Whether to automatically externalize dependencies of type `peerDependencies`.

Whether to automatically externalize dependencies of type `devDependencies`.

## Default Value
## Default value

The default value of `autoExternal` is `true`, which means the following dependency types will **not be bundled**:

Expand Down Expand Up @@ -91,7 +91,7 @@ export default {

## Example

### Customize Externalized Dependency Types
### Customize externalized dependency types

To disable the processing of a specific type of dependency, you can configure `autoExternal` as an object like this:

Expand All @@ -109,7 +109,7 @@ export default {
};
```

### Disable Default Behavior
### Disable default behavior

If you want to disable the default behavior, you can set `autoExternal` to `false`:

Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/config/lib/banner.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Banner = {

Inject content into the top of each JavaScript, CSS or DTS output file.

## Object Type
## Object type

### banner.js

Expand Down Expand Up @@ -48,7 +48,7 @@ The banner content in JavaScript and CSS file is based on the [BannerPlugin](htt
- `raw: true` is enabled by default, so the banner content will be injected as a raw string instead of wrapping in a comment. So if you want to inject a comment, you should add `/*` and `*/` or other comment syntax by yourself.
- The `stage` option is set to the stage after the JavaScript and CSS files are optimized, thus preventing the banner content from being optimized away.

## Customize Banner Content
## Customize banner content

If the above default settings cannot meet your requirements, you can customize the banner content through `tools.rspack.plugins` to add a [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) instance with the corresponding options.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/config/lib/bundle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The bundleless mode is not fully supported yet, and some features like [assets](

:::

## Set Entry
## Set entry

We should specify the entry file for the build.

Expand Down
10 changes: 5 additions & 5 deletions website/docs/en/config/lib/dts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Dts =

Configure the generation of the TypeScript declaration files.

## Boolean Type
## Boolean type

DTS generation is an optional feature, you can set `dts: true` to enable [bundleless DTS](/guide/advanced/dts#bundleless-dts) generation.

Expand Down Expand Up @@ -50,7 +50,7 @@ export default {
};
```

## Object Type
## Object type

If you want to customize the DTS generation, you can set the `dts` option to an object.

Expand Down Expand Up @@ -92,7 +92,7 @@ export default {

:::

#### Handle Third-Party Packages
#### Handle third-party packages

When we bundle DTS files, we should specify which third-party package types need to be bundled, refer to the [Handle Third-Party Dependencies](/guide/advanced/third-party-deps) documentation for more details about externals related configurations.

Expand All @@ -102,7 +102,7 @@ When we bundle DTS files, we should specify which third-party package types need

The output directory of DTS files.

#### Default Value
#### Default value

The default value follows the priority below:

Expand Down Expand Up @@ -175,7 +175,7 @@ When this configuration is disabled, there is no guarantee that the type files w

Whether to automatically set the DTS file extension based on the [format](/config/lib/format) option.

#### Default Extension
#### Default extension

By default that when `dts.autoExtension` is `false`, the DTS file extension will be `.d.ts`.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/config/lib/footer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Footer = {

Inject content into the bottom of each JavaScript, CSS or DTS file.

## Object Type
## Object type

### footer.js

Expand Down Expand Up @@ -48,7 +48,7 @@ The footer content in JavaScript and CSS file is based on the [BannerPlugin](htt
- `raw: true` is enabled by default, so the footer content will be injected as a raw string instead of wrapping in a comment. So if you want to inject a comment, you should add `/*` and `*/` or other comment syntax by yourself.
- The `stage` option is set to the stage after the JavaScript and CSS files are optimized, thus preventing the footer content from being optimized away.

## Customize Footer Content
## Customize footer content

If the above default settings cannot meet your requirements, you can customize the footer content through `tools.rspack.plugins` to add a [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) instance with the corresponding options.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/config/lib/id.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Rslib uses Rsbuild's [environments](https://rsbuild.dev/guide/advanced/environme

:::

## Default Value
## Default value

By default, Rslib automatically generates an ID for each library in the format `${format}${index}`. Here, `format` refers to the value specified in the current lib's [format](/config/lib/format), and `index` indicates the order of the library within all libraries of the same format. If there is only one library with the current format, the `index` will be empty. Otherwise, it will start from `0` and increment.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/config/lib/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lib Configurations
# Lib configurations

- **Type:**

Expand Down
6 changes: 3 additions & 3 deletions website/docs/en/config/lib/syntax.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Configure the syntax to which JavaScript and CSS will be downgraded.

See [Output Compatibility - Syntax Downgrade](/guide/advanced/output-compatibility) for more details.

## Set ECMAScript Version
## Set ECMAScript version

You can set the ECMAScript version directly, such as `es2015`, `es2022`, etc.

Expand All @@ -41,7 +41,7 @@ export default {
};
```

## Set Browserslist Query
## Set browserslist query

You can also set the [Browserslist query](https://browsersl.ist/), such as `last 2 versions`, `> 1%`, `node >= 16`, `chrome >= 80`, etc.

Expand All @@ -55,7 +55,7 @@ export default {
};
```

## Mix ECMAScript Version and Browserslist Query
## Mix ECMAScript version and browserslist query

You can also mix ECMAScript version and Browserslist query, such as `es2015` and `node 20`. Rslib will turn ECMAScript Version into Browserslist query, and then merge them together.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/config/rsbuild/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RsbuildDocBadge } from '@components/RsbuildDocBadge';
import { Overview } from 'rspress/theme';

# Rsbuild Configurations
# Rsbuild configurations

Rslib inherits its configuration from Rsbuild, so you can also configure the <RsbuildDocBadge path="/config" text="config" /> options from Rsbuild. This chapter introduces some common configuration items and explains how to use them in Rslib.

Expand Down
6 changes: 3 additions & 3 deletions website/docs/en/config/rsbuild/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rslib and Rsbuild share the same plugin system, so you can use Rsbuild plugins i
Currently, some plugins have not been adapted to the [bundleless](/guide/basic/output-structure#bundle--bundleless) mode of Rslib, such as the Vue plugin and Svelte plugin. Therefore, these plugins can only be used in the bundle mode.
:::

## Using Plugins
## Using plugins

You can register Rsbuild plugins in `rslib.config.*` using the `plugins` option, see [Rsbuild - plugins](https://rsbuild.dev/config/plugins).

Expand All @@ -23,7 +23,7 @@ export default defineConfig({
});
```

## Official Plugins
## Official plugins

The following are official plugins that can be used in Rsbuild, and applicable to Rslib.

Expand Down Expand Up @@ -90,7 +90,7 @@ The following are common framework-agnostic plugins:
You can find the source code of all official plugins in [web-infra-dev/rsbuild](https://github.com/web-infra-dev/rsbuild) and [rspack-contrib](https://github.com/rspack-contrib).
:::

## Community Plugins
## Community plugins

You can check out the Rsbuild plugins provided by the community at [awesome-rspack - Rsbuild Plugins](https://github.com/web-infra-dev/awesome-rspack?tab=readme-ov-file#rsbuild-plugins).

Expand Down
Loading

0 comments on commit ed6dd8d

Please sign in to comment.