Skip to content

Commit a2770f1

Browse files
committed
The JS library is now a release candidate
1 parent fa22cd8 commit a2770f1

12 files changed

+1748
-1161
lines changed

.npmignore

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
.editorconfig
2+
.eslintignore
3+
.eslintrc.json
4+
.gitattributes
5+
.gitignore
6+
.npmignore
7+
.prettierignore
8+
.prettierrc
19
.rpt2_cache
10+
tests\**
211
docs
312
example
13+
src
14+
*.tgz
15+
*.cmd

README.md

+38-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
# JavaScript library for Coderr
22

3-
This library is alpha. Feel free to try it, and please give us feedback.
3+
This library is currently avilable as a release candidate. Feel free to try it, and please give us feedback.
44

5-
## Example
5+
https://coderr.io
6+
7+
## Examples
8+
9+
The following examples are just demonstrating basic usage:
10+
11+
### Using plain browser scripts
612

713
```html
814
<html>
915
<head>
1016
<script src="coderr.browser.js"></script>
1117
<script>
1218
// Setup
13-
var config = new coderr.Configuration("http://localhost:50473/", "f7aeacfdbe5447cdada6aa9ee21d24fb");
19+
var config = new coderr.Configuration("https://report.coderr.io", "f7aeacfdbe5447cdada6aa9ee21d24fb");
1420
var reporter = new coderr.Coderr(config);
1521
1622
// report all unhandled errors
@@ -21,7 +27,7 @@ This library is alpha. Feel free to try it, and please give us feedback.
2127
// This is how manual reporting is done.
2228
//
2329
// In this case not really nessacary since
24-
// "catchDomErrors" would have reprted it.
30+
// "catchDomErrors" would have reported it.
2531
try {
2632
var a = 10 / 0;
2733
}
@@ -33,10 +39,36 @@ This library is alpha. Feel free to try it, and please give us feedback.
3339
</html>
3440
````
3541

36-
## Example from UI
42+
**From the Coderr Server UI**
3743

3844
![](docs/error_example.png)
3945

4046
Example showing the "userAgent" context collection.
4147

42-
Coderr automatically includes information about the window, document, cookies, navigator and screen.
48+
For browsers, Coderr automatically includes information about the window, document, cookies, navigator and screen.
49+
50+
## Using TypeScript
51+
52+
```typescript
53+
import { CoderrClient, Configuration } from "coderr.client";
54+
import { catchVueErrors } from "./Coderr.Vue"
55+
56+
var config = new Configuration("https://report.coderr.io/", "8ffd506b153f4ca690daaf6abd5fdcdf");
57+
config.environmentName = 'production';
58+
config.applicationVersion = 'v1.0';
59+
60+
var client = new CoderrClient(config);
61+
client.catchDomErrors();
62+
catchVueErrors(client);
63+
```
64+
65+
**Result**
66+
67+
![](docs/vue.png)
68+
69+
For VueJs, Coderr collections information about the failing component, the HTML for the rendered component view, selected routes and more.
70+
71+
72+
# Questions
73+
74+
https://discuss.coderr.io

docs/vue.png

67 KB
Loading

0 commit comments

Comments
 (0)