Skip to content

Commit

Permalink
docs: Add README documentation to root and individual packages. (#28)
Browse files Browse the repository at this point in the history
Flesh out a lot of the readmes from the root package to the individual package readmes.
  • Loading branch information
nicholas-codecov authored Dec 14, 2023
1 parent 0160343 commit 1d258a6
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 5 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,26 @@

# Codecov Bundler Plugins

TODO
> [!WARNING]
> These plugins are currently in alpha and are subject to change.
Codecov plugins for various JavaScript bundlers. Currently supporting Rollup, Vite, Webpack 5.

Checkout the individual packages for more information and examples:

- [Rollup](https://npmjs.org/package/@codecov/rollup-plugin)
- [Vite](https://npmjs.org/package/@codecov/vite-plugin)
- [Webpack](https://npmjs.org/package/@codecov/webpack-plugin)

## Features

The Codecov Bundler Plugins take care of Codecov-related tasks at build time of your JavaScript programs.
It supports the following features:

- Bundle Analysis Stats Upload

## More information

- [Codecov Documentation](https://docs.codecov.com/docs)
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
- [Sentry Discord](https://discord.gg/Ww9hbqr)
14 changes: 14 additions & 0 deletions integration-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<p align="center">
<a href="https://about.codecov.io" target="_blank">
<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">
</a>
</p>

# Integration Tests

Each directory in the fixtures directory represents one testing scenario, with a corresponding test file for each bundler we currently support.
When `pnpm run test:e2e` is ran, we run jest, which will pick up all \*.test.ts files.

In the `test-api` directory is a simple API that we use to create more realistic testing scenarios for each bundler.

In the `test-apps` directory are a set of apps that we use to test the integration with each bundler.
23 changes: 22 additions & 1 deletion packages/bundler-plugin-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,25 @@

# Codecov Bundler Plugin Core

TODO
> [!WARNING]
> These plugins are currently in alpha and are subject to change.
Core package containing the bundler-agnostic logic for the Codecov Bundler Plugins.

Checkout the individual packages for more information and examples:

- [Rollup](https://npmjs.org/package/@codecov/rollup-plugin)
- [Vite](https://npmjs.org/package/@codecov/vite-plugin)
- [Webpack](https://npmjs.org/package/@codecov/webpack-plugin)

## Features

The Codecov Bundler Core package contains the following functionality:

- Bundle Analysis Stats Upload

## More information

- [Codecov Documentation](https://docs.codecov.com/docs)
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
- [Sentry Discord](https://discord.gg/Ww9hbqr)
50 changes: 49 additions & 1 deletion packages/rollup-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,52 @@

# Codecov Rollup Plugin

TODO
> [!WARNING]
> These plugins are currently in alpha and are subject to change.
> A Rollup plugin that provides bundle analysis support for Codecov.
## Installation

Using npm:

```bash
npm install @codecov/rollup-plugin --save-dev
```

Using yarn:

```bash
yarn add @codecov/rollup-plugin --dev
```

Using pnpm

```bash
pnpm add @codecov/rollup-plugin --save-dev
```

## Example

```js
// rollup.config.js
import { defineConfig } from "rollup";
import { codecovRollupPlugin } from "@codecov/rollup-plugin";

export default defineConfig({
plugins: [
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: true,
bundleName: "example-rollup-bundle",
globalUploadToken: process.env.CODECOV_TOKEN,
}),
],
});
```

## More information

- [Codecov Documentation](https://docs.codecov.com/docs)
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
- [Sentry Discord](https://discord.gg/Ww9hbqr)
50 changes: 49 additions & 1 deletion packages/vite-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,52 @@

# Codecov Vite Plugin

TODO
> [!WARNING]
> These plugins are currently in alpha and are subject to change.
> A Vite plugin that provides bundle analysis support for Codecov.
## Installation

Using npm:

```bash
npm install @codecov/vite-plugin --save-dev
```

Using yarn:

```bash
yarn add @codecov/vite-plugin --dev
```

Using pnpm

```bash
pnpm add @codecov/vite-plugin --save-dev
```

## Example

```js
// vite.config.js
import { defineConfig } from "vite";
import { codecovVitePlugin } from "@codecov/vite-plugin";

export default defineConfig({
plugins: [
// Put the Codecov vite plugin after all other plugins
codecovVitePlugin({
enableBundleAnalysis: true,
bundleName: "example-vite-bundle",
globalUploadToken: process.env.CODECOV_TOKEN,
}),
],
});
```

## More information

- [Codecov Documentation](https://docs.codecov.com/docs)
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
- [Sentry Discord](https://discord.gg/Ww9hbqr)
56 changes: 55 additions & 1 deletion packages/webpack-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,58 @@

# Codecov Webpack Plugin

TODO
> [!WARNING]
> These plugins are currently in alpha and are subject to change.
> A Webpack plugin that provides bundle analysis support for Codecov.
## Installation

Using npm:

```bash
npm install @codecov/webpack-plugin --save-dev
```

Using yarn:

```bash
yarn add @codecov/webpack-plugin --dev
```

Using pnpm

```bash
pnpm add @codecov/webpack-plugin --save-dev
```

## Example

```js
// webpack.config.js
const path = require("path");
const { codecovWebpackPlugin } = require("@codecov/webpack-plugin");

module.exports = {
entry: "./src/index.js",
mode: "production",
output: {
filename: "main.js",
path: path.resolve(__dirname, "dist"),
},
plugins: [
// Put the Codecov vite plugin after all other plugins
codecovWebpackPlugin({
enableBundleAnalysis: true,
bundleName: "example-webpack-bundle",
globalUploadToken: process.env.CODECOV_TOKEN,
}),
],
};
```

## More information

- [Codecov Documentation](https://docs.codecov.com/docs)
- [Codecov Feedback](https://github.com/codecov/feedback/discussions)
- [Sentry Discord](https://discord.gg/Ww9hbqr)

0 comments on commit 1d258a6

Please sign in to comment.