-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): add brief mode documents (#488)
- Loading branch information
Showing
12 changed files
with
289 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
["intro", "quick-start", "features", "cli"] | ||
["intro", "quick-start", "features", "cicd", "cli"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# CI/CD Tutorial | ||
|
||
In CI/CD, there is often a desire to upload historical reports to the CDN as historical records. Because it's not convenient to achieve instant use in the standard mode, the **Brief** mode is supported. | ||
|
||
## Brief Mode | ||
|
||
In Brief mode, data reports are integrated into a single HTML page, making it easy for users to view historical build data in a summary form within CI/CD and other scenarios. | ||
|
||
### Enabling Brief Mode | ||
|
||
You can enable Brief mode by configuring the `mode.brief` option in the Rsdoctor plugin. After the build, Brief mode will generate a report in the build output directory: `[outputDir]/.rsdoctor/report-rsdoctor.html`. You can view the build analysis summary by opening the HTML file in a browser. | ||
|
||
- In Brief mode, no code data is displayed to prevent the page from crashing due to large data sizes. | ||
- The report output directory and file name can be configured. Refer to: [Options](/config/options/options#brief). | ||
- For more configurations, refer to: [Options](/config/options/options#brief). | ||
|
||
```ts title="rspack.config.js" | ||
const { RsdoctorRspackPlugin } = require('@rsdoctor/rspack-plugin'); | ||
|
||
module.exports = { | ||
// ... | ||
plugins: [ | ||
process.env.RSDOCTOR && | ||
new RsdoctorRspackPlugin({ | ||
// other options | ||
mode: 'brief', | ||
}), | ||
].filter(Boolean), | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
```ts | ||
interface RsdoctorRspackPluginFeatures { | ||
/** | ||
* turn off it if you need not to analyze the executions of webpack loaders. | ||
* @default true | ||
*/ | ||
loader?: boolean; | ||
/** | ||
* turn off it if you need not to analyze the executions of webpack plugins. | ||
* @default true | ||
*/ | ||
plugins?: boolean; | ||
/** | ||
* turn off it if you need not to analyze the output bundle. | ||
* @default true | ||
*/ | ||
bundle?: boolean; | ||
/** | ||
* turn on it if you just use lite mode. This mode do not have source codes. | ||
* @default false | ||
* @deprecated | ||
*/ | ||
lite?: boolean; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
```ts | ||
interface RsdoctorWebpackPluginFeatures { | ||
/** | ||
* turn off it if you need not to analyze the executions of webpack loaders. | ||
* @default true | ||
*/ | ||
loader?: boolean; | ||
/** | ||
* turn off it if you need not to analyze the executions of webpack plugins. | ||
* @default true | ||
*/ | ||
plugins?: boolean; | ||
/** | ||
* turn off it if you need not to analyze the executions of resolver. | ||
* @default false | ||
*/ | ||
resolver?: boolean; | ||
/** | ||
* turn off it if you need not to analyze the output bundle. | ||
* @default true | ||
*/ | ||
bundle?: boolean; | ||
/** | ||
* turn on it if you just use lite mode. This mode do not have source codes. | ||
* @default false | ||
* @deprecated | ||
*/ | ||
lite?: boolean; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.