diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1dec1ca --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - '7' + - '6' + - '5' + - '4' +cache: + yarn: true + directories: + - node_modules +after_success: + - npm run coveralls \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 7e44aa5..d85a509 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,6 +9,6 @@ "**/node_modules": true, "**/.vscode": true, "**/dist": true, - "**/.**": true + "**/.**": false } } \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..984dd02 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) René Viering (rene.js.org) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2f59a1f --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +[![such bull](https://img.shields.io/badge/such-bull-1393d5.svg?style=flat)](https://bullg.it/) +[![much git](https://img.shields.io/badge/very-git-7ED321.svg?style=flat)](https://bullg.it/) + +[![npm version](https://badge.fury.io/js/promise-promise.svg)](http://badge.fury.io/js/promise-promise) +[![Build Status](https://travis-ci.org/bullgit/promise-promise.svg?branch=master)](https://travis-ci.org/bullgit/promise-promise) +[![Coverage Status](https://coveralls.io/repos/github/bullgit/promise-promise/badge.svg?branch=master)](https://coveralls.io/github/bullgit/promise-promise?branch=master) +[![devDependency Status](https://david-dm.org/bullgit/promise-promise/dev-status.svg?theme=shields.io)](https://david-dm.org/bullgit/promise-promise#info=devDependencies) +[![Unicorn](https://img.shields.io/badge/unicorn-approved-ff69b4.svg?style=flat)](https://www.youtube.com/watch?v=qRC4Vk6kisY) + +# promise-promise + +> A funny Promise API for those who can't keep promises. There's a 50:50 chance that the promise will be fulfilled. If not, it rejects with a random developer excuse. 😎😇 Good luck 🙈 + +## Install + +``` +$ npm install promise-promise --save +``` + +## Usage + +```javascript +import Promise from 'promise-promise'; + +const myAsyncOperation = new Promise(resolve => { + resolve('I should resolve 😱'); +}); + + +myAsyncOperation + .then(response => { + console.log(response); // Sometimes it resolves + }) + .catch(error => { + console.log(err); // Sometimes not 😎 + }); +``` + +## License +MIT © [René Viering](http://rene.js.org) \ No newline at end of file diff --git a/package.json b/package.json index 55962c7..fe94437 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,41 @@ { - "name": "promise-promise", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "jest --coverage", - "test:dev": "jest --watch", - "test:cov": "jest --coverage", - "build": "rollup -c && rollup -c rollup.prod.config.js", - "build:dev": "rollup -c rollup.prod.config.js", - "build:prod": "rollup -c rollup.prod.config.js", - "coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls" - }, - "author": "René Viering", - "license": "MIT", - "devDependencies": { - "babel-jest": "^17.0.2", - "babel-preset-es2015-rollup": "^1.2.0", - "coveralls": "^2.11.15", - "eslint": "^3.11.1", - "eslint-config-xo": "^0.17.0", - "jest": "^17.0.3", - "rollup": "^0.36.4", - "rollup-plugin-babel": "^2.6.1", - "rollup-plugin-commonjs": "^5.0.5", - "rollup-plugin-node-resolve": "^2.0.0", - "rollup-plugin-sourcemaps": "^0.4.1", - "rollup-plugin-uglify": "^1.0.1" - } + "name": "promise-promise", + "version": "0.0.0", + "description": "A funny Promise API for those who can't keep promises.", + "main": "index.js", + "scripts": { + "test": "jest --coverage", + "test:dev": "jest --watch", + "test:cov": "jest --coverage", + "build": "rollup -c && rollup -c rollup.prod.config.js", + "build:dev": "rollup -c rollup.prod.config.js", + "build:prod": "rollup -c rollup.prod.config.js", + "coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls" + }, + "files": [ + "dist", + "index.js" + ], + "author": "René Viering", + "license": "MIT", + "devDependencies": { + "babel-jest": "^17.0.2", + "babel-preset-es2015-rollup": "^1.2.0", + "coveralls": "^2.11.15", + "eslint": "^3.11.1", + "eslint-config-xo": "^0.17.0", + "jest": "^17.0.3", + "rollup": "^0.36.4", + "rollup-plugin-babel": "^2.6.1", + "rollup-plugin-commonjs": "^5.0.5", + "rollup-plugin-node-resolve": "^2.0.0", + "rollup-plugin-sourcemaps": "^0.4.1", + "rollup-plugin-uglify": "^1.0.1" + }, + "keywords": [ + "promises", + "es6", + "funny", + "bullgit" + ] }