Skip to content

Commit 2df1ece

Browse files
author
Luca Forstner
authored
docs: Add examples to individual READMEs (#115)
1 parent 2631251 commit 2df1ece

File tree

4 files changed

+147
-7
lines changed

4 files changed

+147
-7
lines changed

packages/esbuild-plugin/README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,42 @@ A esbuild plugin that provides release management features for Sentry:
1515
- Automatic release name discovery (based on CI environment - Vercel, AWS, Heroku, CircleCI, or current Git SHA)
1616
- Automatically association of errors with releases (Release injection)
1717

18-
### Configuration
18+
## Installation
19+
20+
Using npm:
21+
22+
```bash
23+
$ npm install @sentry/esbuild-plugin --save-dev
24+
```
25+
26+
Using yarn:
27+
28+
```bash
29+
$ yarn add @sentry/esbuild-plugin --dev
30+
```
31+
32+
## Usage
33+
34+
```js
35+
// esbuild.config.js
36+
const sentryEsbuildPlugin = require("@sentry/esbuild-plugin");
37+
38+
require("esbuild").build({
39+
plugins: [
40+
sentryEsbuildPlugin({
41+
include: ".",
42+
ignore: ["node_modules", "esbuild.config.js"],
43+
org: process.env.SENTRY_ORG,
44+
project: process.env.SENTRY_PROJECT,
45+
authToken: process.env.SENTRY_AUTH_TOKEN,
46+
}),
47+
],
48+
});
49+
```
50+
51+
As an alternative to passing options explicitly, you can also use a `.sentryclirc` file or environment variables as described in https://docs.sentry.io/product/cli/configuration/.
52+
53+
## Configuration
1954

2055
Every plugin takes an options argument with the following properties:
2156

packages/rollup-plugin/README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,42 @@ A Rollup plugin that provides release management features for Sentry:
1515
- Automatic release name discovery (based on CI environment - Vercel, AWS, Heroku, CircleCI, or current Git SHA)
1616
- Automatically association of errors with releases (Release injection)
1717

18-
### Configuration
18+
## Installation
19+
20+
Using npm:
21+
22+
```bash
23+
$ npm install @sentry/rollup-plugin --save-dev
24+
```
25+
26+
Using yarn:
27+
28+
```bash
29+
$ yarn add @sentry/rollup-plugin --dev
30+
```
31+
32+
## Usage
33+
34+
```js
35+
// rollup.config.js
36+
import sentryRollupPlugin from "@sentry/rollup-plugin";
37+
38+
export default {
39+
plugins: [
40+
sentryRollupPlugin({
41+
include: ".",
42+
ignore: ["node_modules", "rollup.config.js"],
43+
org: process.env.SENTRY_ORG,
44+
project: process.env.SENTRY_PROJECT,
45+
authToken: process.env.SENTRY_AUTH_TOKEN,
46+
}),
47+
],
48+
};
49+
```
50+
51+
As an alternative to passing options explicitly, you can also use a `.sentryclirc` file or environment variables as described in https://docs.sentry.io/product/cli/configuration/.
52+
53+
## Configuration
1954

2055
Every plugin takes an options argument with the following properties:
2156

@@ -34,7 +69,7 @@ Every plugin takes an options argument with the following properties:
3469
| cleanArtifacts | `boolean` | optional | Remove all existing artifacts in the Sentry release before uploading sourcemaps. Defaults to `false`. |
3570
| errorHandler | `function(err: Error): void` | optional | Function that is called when an error occurs during rlease creation or sourcemaps upload. When this function is provided, thrown errors will not cause the process to abort. If you still want to abort the process you can throw an error in the function. |
3671

37-
### More information
72+
## More information
3873

3974
- [Sentry Documentation](https://docs.sentry.io/quickstart/)
4075
- [Troubleshooting Sourcemaps](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/)

packages/vite-plugin/README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,42 @@ A Vite plugin that provides release management features for Sentry:
1515
- Automatic release name discovery (based on CI environment - Vercel, AWS, Heroku, CircleCI, or current Git SHA)
1616
- Automatically association of errors with releases (Release injection)
1717

18-
### Configuration
18+
## Installation
19+
20+
Using npm:
21+
22+
```bash
23+
$ npm install @sentry/vite-plugin --save-dev
24+
```
25+
26+
Using yarn:
27+
28+
```bash
29+
$ yarn add @sentry/vite-plugin --dev
30+
```
31+
32+
## Usage
33+
34+
```ts
35+
// vite.config.ts
36+
import sentryVitePlugin from "@sentry/vite-plugin";
37+
38+
export default {
39+
plugins: [
40+
sentryVitePlugin({
41+
include: ".",
42+
ignore: ["node_modules", "vite.config.ts"],
43+
org: process.env.SENTRY_ORG,
44+
project: process.env.SENTRY_PROJECT,
45+
authToken: process.env.SENTRY_AUTH_TOKEN,
46+
}),
47+
],
48+
};
49+
```
50+
51+
As an alternative to passing options explicitly, you can also use a `.sentryclirc` file or environment variables as described in https://docs.sentry.io/product/cli/configuration/.
52+
53+
## Configuration
1954

2055
Every plugin takes an options argument with the following properties:
2156

@@ -34,7 +69,7 @@ Every plugin takes an options argument with the following properties:
3469
| cleanArtifacts | `boolean` | optional | Remove all existing artifacts in the Sentry release before uploading sourcemaps. Defaults to `false`. |
3570
| errorHandler | `function(err: Error): void` | optional | Function that is called when an error occurs during rlease creation or sourcemaps upload. When this function is provided, thrown errors will not cause the process to abort. If you still want to abort the process you can throw an error in the function. |
3671

37-
### More information
72+
## More information
3873

3974
- [Sentry Documentation](https://docs.sentry.io/quickstart/)
4075
- [Troubleshooting Sourcemaps](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/)

packages/webpack-plugin/README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,42 @@ A Webpack plugin that provides release management features for Sentry:
1515
- Automatic release name discovery (based on CI environment - Vercel, AWS, Heroku, CircleCI, or current Git SHA)
1616
- Automatically association of errors with releases (Release injection)
1717

18-
### Configuration
18+
## Installation
19+
20+
Using npm:
21+
22+
```bash
23+
$ npm install @sentry/webpack-plugin --save-dev
24+
```
25+
26+
Using yarn:
27+
28+
```bash
29+
$ yarn add @sentry/webpack-plugin --dev
30+
```
31+
32+
## Usage
33+
34+
```js
35+
// webpack.config.js
36+
const sentryWebpackPlugin = require("@sentry/webpack-plugin");
37+
38+
module.exports = {
39+
plugins: [
40+
sentryWebpackPlugin({
41+
include: ".",
42+
ignore: ["node_modules", "webpack.config.js"],
43+
org: process.env.SENTRY_ORG,
44+
project: process.env.SENTRY_PROJECT,
45+
authToken: process.env.SENTRY_AUTH_TOKEN,
46+
}),
47+
],
48+
};
49+
```
50+
51+
As an alternative to passing options explicitly, you can also use a `.sentryclirc` file or environment variables as described in https://docs.sentry.io/product/cli/configuration/.
52+
53+
## Configuration
1954

2055
Every plugin takes an options argument with the following properties:
2156

@@ -34,7 +69,7 @@ Every plugin takes an options argument with the following properties:
3469
| cleanArtifacts | `boolean` | optional | Remove all existing artifacts in the Sentry release before uploading sourcemaps. Defaults to `false`. |
3570
| errorHandler | `function(err: Error): void` | optional | Function that is called when an error occurs during rlease creation or sourcemaps upload. When this function is provided, thrown errors will not cause the process to abort. If you still want to abort the process you can throw an error in the function. |
3671

37-
### More information
72+
## More information
3873

3974
- [Sentry Documentation](https://docs.sentry.io/quickstart/)
4075
- [Troubleshooting Sourcemaps](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/)

0 commit comments

Comments
 (0)