-
Notifications
You must be signed in to change notification settings - Fork 212
Add installation guide, improve README
, fixed broken badges and create CONTRIBUTING.md
#1248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
1d6b50d
7beacef
741641e
626c916
1a134f2
6bc51c1
6c44bfe
6ac850f
212a38f
8c697fc
a17483d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Contributing to Rollbar.js | ||
|
||
Thank you for your interest in contributing to Rollbar.js! We welcome contributions from the community. | ||
|
||
## Getting Started | ||
|
||
1. Fork the repository on GitHub | ||
2. Clone your fork locally: | ||
```bash | ||
git clone https://github.com/your-username/rollbar.js.git | ||
cd rollbar.js | ||
``` | ||
3. Install dependencies: | ||
```bash | ||
npm install | ||
``` | ||
4. Build the project: | ||
```bash | ||
npm run build | ||
``` | ||
|
||
## Development Workflow | ||
|
||
### Running Tests | ||
|
||
Run all tests: | ||
```bash | ||
npm test | ||
``` | ||
|
||
Run only browser tests: | ||
```bash | ||
npm run test-browser | ||
``` | ||
|
||
Run only server tests: | ||
```bash | ||
npm run test-server | ||
``` | ||
|
||
### Code Style | ||
|
||
- We use ESLint for code quality. Run `npm run lint` before submitting | ||
- Code should follow the existing style patterns in the codebase | ||
- Use 2 spaces for indentation | ||
- Use single quotes for strings | ||
|
||
### Making Changes | ||
|
||
1. Create a feature branch from `master`: | ||
```bash | ||
git checkout -b my-feature-name | ||
``` | ||
|
||
2. Make your changes and ensure: | ||
- All tests pass | ||
- Code follows our style guidelines | ||
- New features include appropriate tests | ||
- Documentation is updated if needed | ||
brianr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
3. Commit your changes with a clear message: | ||
```bash | ||
git commit -m "Add feature: description of what you added" | ||
``` | ||
|
||
## Submitting a Pull Request | ||
|
||
1. Push your changes to your fork: | ||
```bash | ||
git push origin my-feature-name | ||
``` | ||
|
||
2. Open a pull request on GitHub against the `master` branch | ||
|
||
3. In your pull request description: | ||
- Clearly describe what changes you've made | ||
- Reference any related issues | ||
- Include testing steps if applicable | ||
|
||
4. Wait for review and address any feedback | ||
|
||
## Reporting Issues | ||
|
||
- Use GitHub Issues to report bugs | ||
- Include as much detail as possible: | ||
- Steps to reproduce | ||
- Expected behavior | ||
- Actual behavior | ||
- Environment details (browser, Node.js version, etc.) | ||
|
||
## Questions? | ||
|
||
If you have questions, please: | ||
- Check existing issues and documentation | ||
- Open a GitHub issue for clarification | ||
- Email [email protected] for urgent matters | ||
|
||
Thank you for contributing to Rollbar.js! |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ | |
</p> | ||
|
||
 | ||
[](https://lgtm.com/projects/g/rollbar/rollbar.js/context:javascript) | ||
[](https://lgtm.com/projects/g/rollbar/rollbar.js/alerts) | ||
[](https://www.npmjs.com/package/rollbar) | ||
[](https://www.npmjs.com/package/rollbar) | ||
Comment on lines
-12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lgtm was deprecated by github in favor of their native "code scanning" thing which I haven't investigated, decided however to remove these and do (what seems to be) the more classic npm version+downloads. We have 1.5M dl a month which seemed like a nice number to show off. |
||
|
||
--- | ||
|
||
|
@@ -22,15 +22,56 @@ | |
- **Advanced search:** Filter items by many different properties. <a href="https://docs.rollbar.com/docs/search-items">Learn more about search</a>. | ||
- **Customizable notifications:** Rollbar supports several messaging and incident management tools where your team can get notified about errors and important events by real-time alerts. <a href="https://docs.rollbar.com/docs/notifications">Learn more about Rollbar notifications</a>. | ||
|
||
## Setup Instructions | ||
## Installation | ||
|
||
1. [Sign up for a Rollbar account](https://rollbar.com/signup). | ||
2. For client-side Javascript, follow the [Browser Quick Start](https://docs.rollbar.com/docs/javascript#section-quick-start-browser) instructions. For Node.js, follow the [Server Quick Start](https://docs.rollbar.com/docs/javascript#section-quick-start-server). | ||
Using npm: | ||
|
||
```bash | ||
npm install --save rollbar | ||
``` | ||
|
||
Using yarn: | ||
|
||
```bash | ||
yarn add rollbar | ||
``` | ||
|
||
For CDN/script tag installation, see [Quick Start → Browser](#browser) | ||
|
||
## Quick Start | ||
|
||
First, [**sign up for a Rollbar account**](https://rollbar.com/signup) if you haven't already. | ||
|
||
### Browser | ||
|
||
For the recommended snippet-based installation with automatic error capture and telemetry, see our [Browser JS – Quick Start documentation](https://docs.rollbar.com/docs/browser-js#quick-start). | ||
|
||
### Node.js | ||
|
||
```javascript | ||
const Rollbar = require('rollbar'); | ||
|
||
const rollbar = new Rollbar({ | ||
accessToken: 'POST_SERVER_ITEM_ACCESS_TOKEN', | ||
captureUncaught: true, | ||
captureUnhandledRejections: true, | ||
payload: { code_version: '1.0.0' }, | ||
}); | ||
|
||
// log a generic message and send to rollbar | ||
rollbar.log('Hello world!'); | ||
``` | ||
|
||
For **framework** integrations (**Express**, **Koa**, **Hapi**, and more), custom error handlers, and advanced configuration, see our [Node.js server configuration documentation](https://docs.rollbar.com/docs/nodejs#server-configuration). | ||
|
||
## Usage and Reference | ||
|
||
For complete usage instructions and configuration reference, see our [Javascript SDK docs](https://docs.rollbar.com/docs/javascript). | ||
|
||
### Examples | ||
|
||
See the [examples directory](./examples/) for detailed integration examples with various frameworks and build tools including **React**, **Angular**, **Vue.js**, **Next.js**, and more. | ||
|
||
## Release History & Changelog | ||
|
||
See our [Releases](https://github.com/rollbar/rollbar.js/releases) page for a list of all releases, including changes. | ||
|
@@ -45,10 +86,11 @@ For bug reports, please [open an issue on GitHub](https://github.com/rollbar/rol | |
|
||
To set up a development environment, you'll need Node.js and npm. | ||
matux marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
2. `npm install -D` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why the |
||
3. `make` | ||
1. Clone the repository: `git clone https://github.com/rollbar/rollbar.js.git` | ||
2. Install dependencies: `npm install` | ||
3. Build: `npm run build` | ||
|
||
To run the tests, run `make test`. | ||
To run the tests: `npm test` | ||
|
||
|
||
## Contributing | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.