Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Commit accebbe

Browse files
authored
Merge pull request #7 from bugsnag/bundled-example
Add bundled example project
2 parents 6a12e83 + cf08390 commit accebbe

File tree

18 files changed

+13043
-4
lines changed

18 files changed

+13043
-4
lines changed

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
example
1+
examples

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The script tag creates a global function called `bugsnag__vue` which needs to be
4444
</script>
4545
```
4646

47-
See the [example](example) for more info.
47+
See the [examples](examples) for more info.
4848

4949
### Bundled
5050

example/README.md renamed to examples/basic/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bugsnag: Vue.js Example
1+
# Bugsnag: Vue.js basic example
22

33
This example shows how you can use the Bugsnag JavaScript notifier with
44
[Vue.js](https://vuejs.org/).
@@ -19,7 +19,7 @@ API token with your own!
1919
1. Clone the repo and `cd` into this directory:
2020
```sh
2121
git clone git@github.com:bugsnag/bugsnag-vue.git
22-
cd bugsnag-vue/example
22+
cd bugsnag-vue/examples/basic
2323
```
2424
1. Install the dependencies (with either npm or yarn):
2525
```sh
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/bundled/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw*

examples/bundled/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Bugsnag: Vue.js bundled example
2+
3+
This example shows how you can use the Bugsnag JavaScript notifier with
4+
[Vue.js](https://vuejs.org/) that has a build step. Beyond the features shown in
5+
the [basic example](../basic), this setup shows how to initialize a `bugsnagClient` in a module
6+
that you can reuse in various parts of your application.
7+
8+
This application was generated with [vue-cli](https://github.com/vuejs/vue-cli).
9+
10+
## Setup
11+
12+
Try this out with [your own Bugsnag account](https://app.bugsnag.com/user/new)!
13+
You'll be able to see how the errors are reported in the dashboard, how breadcrumbs
14+
are left, how errors are grouped and how they relate to the original source.
15+
16+
To get set up, follow the instructions below. Don't forget to replace the placeholder
17+
API token with your own!
18+
19+
1. Clone the repo and `cd` into this directory:
20+
```sh
21+
git clone git@github.com:bugsnag/bugsnag-vue.git
22+
cd bugsnag-vue/examples/bundled
23+
```
24+
1. Install the dependencies (with either npm or yarn):
25+
```sh
26+
npm i
27+
```
28+
```sh
29+
yarn
30+
```
31+
1. Replace the `API_KEY` placeholder in [src/lib/bugsnag.js](src/lib/bugsnag.js) with your actual API key.
32+
1. Start the bundler and web server:
33+
```sh
34+
npm run serve
35+
```
36+
1. View the example page which will (most likely) be served at: http://localhost:8080/

0 commit comments

Comments
 (0)