diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5a35e47 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: node_js +cache: + directories: + - node_modules +notifications: + email: false +node_js: + - '8' +before_script: + - npm prune +after_success: + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..0ef7252 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# promwrap + +Wraps modules, and other objects, full of callback functions in promises. + +```javascript +let fun = (x, cb) => cb(null, x) +let _module = {fun, prop: 'test'} + +test('test basics', async t => { + t.plan(4) + let mod = promwrap(_module) + t.same(mod.prop, 'test') + t.same(mod.prop, 'test') + t.same(await mod.fun('test1'), 'test1') + t.same(await promwrap(fun)('test2'), 'test2') +}) +``` \ No newline at end of file diff --git a/package.json b/package.json index b1309b1..2cae956 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "promwrap", - "version": "0.1.0", + "version": "0.0.0-development", "description": "", "main": "index.js", "scripts": { @@ -11,7 +11,8 @@ "postcoverage": "codecov", "precommit": "npm test", "prepush": "npm test", - "commitmsg": "validate-commit-msg" + "commitmsg": "validate-commit-msg", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "keywords": [], "author": "Mikeal Rogers (http://www.mikealrogers.com)", @@ -24,6 +25,10 @@ "standard": "^10.0.2", "tap": "^10.7.1", "validate-commit-msg": "^2.14.0", - "semantic-release": "^6.3.6" + "semantic-release": "^7.0.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/mikeal/promwrap.git" } }