Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
example
examples
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The script tag creates a global function called `bugsnag__vue` which needs to be
</script>
```

See the [example](example) for more info.
See the [examples](examples) for more info.

### Bundled

Expand Down
4 changes: 2 additions & 2 deletions example/README.md → examples/basic/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bugsnag: Vue.js Example
# Bugsnag: Vue.js basic example

This example shows how you can use the Bugsnag JavaScript notifier with
[Vue.js](https://vuejs.org/).
Expand All @@ -19,7 +19,7 @@ API token with your own!
1. Clone the repo and `cd` into this directory:
```sh
git clone git@github.com:bugsnag/bugsnag-vue.git
cd bugsnag-vue/example
cd bugsnag-vue/examples/basic
```
1. Install the dependencies (with either npm or yarn):
```sh
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions examples/bundled/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
36 changes: 36 additions & 0 deletions examples/bundled/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Bugsnag: Vue.js bundled example

This example shows how you can use the Bugsnag JavaScript notifier with
[Vue.js](https://vuejs.org/) that has a build step. Beyond the features shown in
the [basic example](../basic), this setup shows how to initialize a `bugsnagClient` in a module
that you can reuse in various parts of your application.

This application was generated with [vue-cli](https://github.com/vuejs/vue-cli).

## Setup

Try this out with [your own Bugsnag account](https://app.bugsnag.com/user/new)!
You'll be able to see how the errors are reported in the dashboard, how breadcrumbs
are left, how errors are grouped and how they relate to the original source.

To get set up, follow the instructions below. Don't forget to replace the placeholder
API token with your own!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does a user get their own API key?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a link in the paragraphs above to create a new user. For existing users, there isn't a predictable link to get the api key because the url path contains the project slug. I guess we could be verbose here and give instructions, but I think that might be overkill?


1. Clone the repo and `cd` into this directory:
```sh
git clone git@github.com:bugsnag/bugsnag-vue.git
cd bugsnag-vue/examples/bundled
```
1. Install the dependencies (with either npm or yarn):
```sh
npm i
```
```sh
yarn
```
1. Replace the `API_KEY` placeholder in [src/lib/bugsnag.js](src/lib/bugsnag.js) with your actual API key.
1. Start the bundler and web server:
```sh
npm run serve
```
1. View the example page which will (most likely) be served at: http://localhost:8080/
Loading