Skip to content

Commit 1d258a6

Browse files
authored
docs: Add README documentation to root and individual packages. (#28)
Flesh out a lot of the readmes from the root package to the individual package readmes.
1 parent 0160343 commit 1d258a6

File tree

6 files changed

+212
-5
lines changed

6 files changed

+212
-5
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,26 @@
66

77
# Codecov Bundler Plugins
88

9-
TODO
9+
> [!WARNING]
10+
> These plugins are currently in alpha and are subject to change.
11+
12+
Codecov plugins for various JavaScript bundlers. Currently supporting Rollup, Vite, Webpack 5.
13+
14+
Checkout the individual packages for more information and examples:
15+
16+
- [Rollup](https://npmjs.org/package/@codecov/rollup-plugin)
17+
- [Vite](https://npmjs.org/package/@codecov/vite-plugin)
18+
- [Webpack](https://npmjs.org/package/@codecov/webpack-plugin)
19+
20+
## Features
21+
22+
The Codecov Bundler Plugins take care of Codecov-related tasks at build time of your JavaScript programs.
23+
It supports the following features:
24+
25+
- Bundle Analysis Stats Upload
26+
27+
## More information
28+
29+
- [Codecov Documentation](https://docs.codecov.com/docs)
30+
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
31+
- [Sentry Discord](https://discord.gg/Ww9hbqr)

integration-tests/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<p align="center">
2+
<a href="https://about.codecov.io" target="_blank">
3+
<img src="https://about.codecov.io/wp-content/themes/codecov/assets/brand/sentry-cobranding/logos/codecov-by-sentry-logo.svg" alt="Codecov by Sentry logo" width="280" height="84">
4+
</a>
5+
</p>
6+
7+
# Integration Tests
8+
9+
Each directory in the fixtures directory represents one testing scenario, with a corresponding test file for each bundler we currently support.
10+
When `pnpm run test:e2e` is ran, we run jest, which will pick up all \*.test.ts files.
11+
12+
In the `test-api` directory is a simple API that we use to create more realistic testing scenarios for each bundler.
13+
14+
In the `test-apps` directory are a set of apps that we use to test the integration with each bundler.

packages/bundler-plugin-core/README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,25 @@
66

77
# Codecov Bundler Plugin Core
88

9-
TODO
9+
> [!WARNING]
10+
> These plugins are currently in alpha and are subject to change.
11+
12+
Core package containing the bundler-agnostic logic for the Codecov Bundler Plugins.
13+
14+
Checkout the individual packages for more information and examples:
15+
16+
- [Rollup](https://npmjs.org/package/@codecov/rollup-plugin)
17+
- [Vite](https://npmjs.org/package/@codecov/vite-plugin)
18+
- [Webpack](https://npmjs.org/package/@codecov/webpack-plugin)
19+
20+
## Features
21+
22+
The Codecov Bundler Core package contains the following functionality:
23+
24+
- Bundle Analysis Stats Upload
25+
26+
## More information
27+
28+
- [Codecov Documentation](https://docs.codecov.com/docs)
29+
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
30+
- [Sentry Discord](https://discord.gg/Ww9hbqr)

packages/rollup-plugin/README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,52 @@
66

77
# Codecov Rollup Plugin
88

9-
TODO
9+
> [!WARNING]
10+
> These plugins are currently in alpha and are subject to change.
11+
12+
> A Rollup plugin that provides bundle analysis support for Codecov.
13+
14+
## Installation
15+
16+
Using npm:
17+
18+
```bash
19+
npm install @codecov/rollup-plugin --save-dev
20+
```
21+
22+
Using yarn:
23+
24+
```bash
25+
yarn add @codecov/rollup-plugin --dev
26+
```
27+
28+
Using pnpm
29+
30+
```bash
31+
pnpm add @codecov/rollup-plugin --save-dev
32+
```
33+
34+
## Example
35+
36+
```js
37+
// rollup.config.js
38+
import { defineConfig } from "rollup";
39+
import { codecovRollupPlugin } from "@codecov/rollup-plugin";
40+
41+
export default defineConfig({
42+
plugins: [
43+
// Put the Codecov rollup plugin after all other plugins
44+
codecovRollupPlugin({
45+
enableBundleAnalysis: true,
46+
bundleName: "example-rollup-bundle",
47+
globalUploadToken: process.env.CODECOV_TOKEN,
48+
}),
49+
],
50+
});
51+
```
52+
53+
## More information
54+
55+
- [Codecov Documentation](https://docs.codecov.com/docs)
56+
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
57+
- [Sentry Discord](https://discord.gg/Ww9hbqr)

packages/vite-plugin/README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,52 @@
66

77
# Codecov Vite Plugin
88

9-
TODO
9+
> [!WARNING]
10+
> These plugins are currently in alpha and are subject to change.
11+
12+
> A Vite plugin that provides bundle analysis support for Codecov.
13+
14+
## Installation
15+
16+
Using npm:
17+
18+
```bash
19+
npm install @codecov/vite-plugin --save-dev
20+
```
21+
22+
Using yarn:
23+
24+
```bash
25+
yarn add @codecov/vite-plugin --dev
26+
```
27+
28+
Using pnpm
29+
30+
```bash
31+
pnpm add @codecov/vite-plugin --save-dev
32+
```
33+
34+
## Example
35+
36+
```js
37+
// vite.config.js
38+
import { defineConfig } from "vite";
39+
import { codecovVitePlugin } from "@codecov/vite-plugin";
40+
41+
export default defineConfig({
42+
plugins: [
43+
// Put the Codecov vite plugin after all other plugins
44+
codecovVitePlugin({
45+
enableBundleAnalysis: true,
46+
bundleName: "example-vite-bundle",
47+
globalUploadToken: process.env.CODECOV_TOKEN,
48+
}),
49+
],
50+
});
51+
```
52+
53+
## More information
54+
55+
- [Codecov Documentation](https://docs.codecov.com/docs)
56+
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
57+
- [Sentry Discord](https://discord.gg/Ww9hbqr)

packages/webpack-plugin/README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,58 @@
66

77
# Codecov Webpack Plugin
88

9-
TODO
9+
> [!WARNING]
10+
> These plugins are currently in alpha and are subject to change.
11+
12+
> A Webpack plugin that provides bundle analysis support for Codecov.
13+
14+
## Installation
15+
16+
Using npm:
17+
18+
```bash
19+
npm install @codecov/webpack-plugin --save-dev
20+
```
21+
22+
Using yarn:
23+
24+
```bash
25+
yarn add @codecov/webpack-plugin --dev
26+
```
27+
28+
Using pnpm
29+
30+
```bash
31+
pnpm add @codecov/webpack-plugin --save-dev
32+
```
33+
34+
## Example
35+
36+
```js
37+
// webpack.config.js
38+
const path = require("path");
39+
const { codecovWebpackPlugin } = require("@codecov/webpack-plugin");
40+
41+
module.exports = {
42+
entry: "./src/index.js",
43+
mode: "production",
44+
output: {
45+
filename: "main.js",
46+
path: path.resolve(__dirname, "dist"),
47+
},
48+
plugins: [
49+
// Put the Codecov vite plugin after all other plugins
50+
codecovWebpackPlugin({
51+
enableBundleAnalysis: true,
52+
bundleName: "example-webpack-bundle",
53+
globalUploadToken: process.env.CODECOV_TOKEN,
54+
}),
55+
],
56+
};
57+
```
58+
59+
## More information
60+
61+
- [Codecov Documentation](https://docs.codecov.com/docs)
62+
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
63+
- [Sentry Discord](https://discord.gg/Ww9hbqr)

0 commit comments

Comments
 (0)