Skip to content

Commit

Permalink
fix(readme): Add usage documentation and badges
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Sep 25, 2017
1 parent 42957aa commit 39997b3
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions README.md
@@ -1,12 +1,28 @@
# semantic-release-error
# @semantic-release/error

Error type used by all [semantic-release](https://github.com/semantic-release/semantic-release) packages.

[![npm](https://img.shields.io/npm/v/@semantic-release/error.svg)](https://www.npmjs.com/package/@semantic-release/error)
[![Greenkeeper badge](https://badges.greenkeeper.io/semantic-release/error.svg)](https://greenkeeper.io/)
[![npm version](https://badge.fury.io/js/semantic-release-error.svg)](http://badge.fury.io/js/semantic-release-error)
[![Build Status](https://travis-ci.org/semantic-release/error.svg?branch=master)](https://travis-ci.org/semantic-release/error)
[![Dependency Status](https://david-dm.org/semantic-release/error.svg)](https://david-dm.org/semantic-release/error)
[![devDependency Status](https://david-dm.org/semantic-release/error/dev-status.svg)](https://david-dm.org/semantic-release/error#info=devDependencies)
[![license](https://img.shields.io/github/license/semantic-release/error.svg)](https://github.com/semantic-release/error/blob/master/LICENSE)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

[![Travis](https://img.shields.io/travis/semantic-release/error.svg)](https://travis-ci.org/semantic-release/error)
[![Codecov](https://img.shields.io/codecov/c/github/semantic-release/error.svg)](https://codecov.io/gh/semantic-release/error)

## Usage

```js
const SemanticReleaseError = require('@semantic-release/error');

// Default
throw new SemanticReleaseError();

// With error message
throw new SemanticReleaseError('An error happened');

// With error message and error code
throw new SemanticReleaseError('An error happened', 'ECODE');
```

0 comments on commit 39997b3

Please sign in to comment.