Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
vdemedes committed Mar 30, 2015
0 parents commit af794fb
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test.js
35 changes: 35 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# leeroy-jenkins

Let Leeroy Jenkins make your boring developer life more fun.

**Note**: This shit is for Node.js/io.js and only works on OS X (PRs are welcome).


### Installation

```
$ npm install leeroy-jenkins --save
```


### Usage

Require `leeroy-jenkins` and get happier every time when an `Error` is thrown.

```javascript
require('leeroy-jenkins');

throw new Error('Oh shit!');
```


### Tests

```
$ npm test
```


### License

WTFPL.
30 changes: 30 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Dependencies
*/

const spawn = require('child_process').spawn;


/**
* Expose Leeroy
*/

module.exports = LeeroyJenkinsError;


/**
* Leeroy Jenkins himself
*/

function LeeroyJenkinsError (message) {
spawn('afplay', [__dirname + '/leeroy.wav']).unref();

return new _Error(message);
}

const _Error = Error;

LeeroyJenkinsError.prototype = new _Error();
LeeroyJenkinsError.prototype.constructor = LeeroyJenkinsError;

global.Error = LeeroyJenkinsError; // oh yeah
Binary file added leeroy.wav
Binary file not shown.
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "leeroy-jenkins",
"version": "1.0.1",
"description": "Leeeeeroy Jeeeenkins",
"main": "index.js",
"scripts": {
"test": "node ./test"
},
"repository": {
"type": "git",
"url": "https://github.com/vdemedes/leeroy-jenkins.git"
},
"keywords": [
"jenkins"
],
"author": "Vadim Demedes <[email protected]>",
"license": "WTFPL",
"bugs": {
"url": "https://github.com/vdemedes/leeroy-jenkins/issues"
},
"homepage": "https://github.com/vdemedes/leeroy-jenkins"
}
3 changes: 3 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require('./');

throw new Error('Oh shit!');

0 comments on commit af794fb

Please sign in to comment.