From 813d577f1596c50ad5fe215e1669b3a6f47fc51d Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sat, 25 Jun 2016 15:47:44 -0700 Subject: [PATCH] Scaffold: Normalize project --- .editorconfig | 12 ++++++++++++ .gitignore | 8 ++++++-- LICENSE | 4 ++-- README.md | 40 ++++++++++++++++++++++++++++++++-------- appveyor.yml | 25 +++++++++++++++++++++++++ package.json | 12 ++++++++---- 6 files changed, 85 insertions(+), 16 deletions(-) create mode 100644 .editorconfig create mode 100644 appveyor.yml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5760be5 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore index da23d0d..bfb1212 100644 --- a/.gitignore +++ b/.gitignore @@ -16,10 +16,14 @@ coverage # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt +# node-waf configuration +.lock-wscript + # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release # Dependency directory -# Deployed apps should consider commenting this line out: -# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules + +.DS_Store diff --git a/LICENSE b/LICENSE index 406d1e6..0b2955a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Blaine Bublitz +Copyright (c) 2014 Blaine Bublitz, Eric Schoffstall and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ 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 +SOFTWARE. diff --git a/README.md b/README.md index a1a1030..c08c42e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,14 @@ -async-settle -============ +

+ + + +

-[![build status](https://secure.travis-ci.org/gulpjs/async-settle.png)](http://travis-ci.org/gulpjs/async-settle) +# async-settle -Settle your async functions - when you need to know all your parallel functions are complete (success or failure) +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Settle an async function. It will always complete successfully with an object of the resulting state. Handles completion and errors for callbacks, promises, observables and streams. @@ -47,17 +52,17 @@ Takes a function to execute (`fn`) and a function to call on completion (`callba #### `fn([done])` -Optionally takes a callback to call when async tasks are complete. +Optionally takes a callback (`done`) to call when async tasks are complete. -Executed in the context of [`async-done`](https://github.com/gulpjs/async-done), with all errors and results being settled. +Executed in the context of [`async-done`][async-done], with all errors and results being settled. -Completion is handled by [`async-done` completion and error resolution](https://github.com/gulpjs/async-done#completion-and-error-resolution). +Completion is handled by [`async-done` completion and error resolution][completions]. #### `callback(error, result)` Called on completion of `fn` and recieves a settled object as the `result` argument. -Teh `error` argument will always be `null`. +The `error` argument will always be `null`. #### Settled Object @@ -70,3 +75,22 @@ Settled values have two properties, `state` and `value`. ## License MIT + +[async-done]: https://github.com/gulpjs/async-done +[completions]: https://github.com/gulpjs/async-done#completion-and-error-resolution + +[downloads-image]: http://img.shields.io/npm/dm/async-settle.svg +[npm-url]: https://www.npmjs.com/package/async-settle +[npm-image]: http://img.shields.io/npm/v/async-settle.svg + +[travis-url]: https://travis-ci.org/gulpjs/async-settle +[travis-image]: http://img.shields.io/travis/gulpjs/async-settle.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/async-settle +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/async-settle.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/async-settle +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/async-settle/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..625fc10 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,25 @@ +# http://www.appveyor.com/docs/appveyor-yml +# http://www.appveyor.com/docs/lang/nodejs-iojs + +environment: + matrix: + # node.js + - nodejs_version: "0.10" + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "5" + - nodejs_version: "6" + +install: + - ps: Install-Product node $env:nodejs_version + - npm install + +test_script: + - node --version + - npm --version + - cmd: npm test + +build: off + +# build version format +version: "{build}" diff --git a/package.json b/package.json index 850e44b..8361881 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "async-settle", "version": "0.2.1", - "description": "Settle your async functions - when you need to know all your parallel functions are complete (success or failure)", - "author": "Blaine Bublitz (http://iceddev.com/)", + "description": "Settle an async function.", + "author": "Gulp Team (http://gulpjs.com/)", "contributors": [ - "Blaine Bublitz (http://iceddev.com/)" + "Blaine Bublitz " ], "repository": "gulpjs/async-settle", "license": "MIT", @@ -12,6 +12,10 @@ "node": ">= 0.10" }, "main": "index.js", + "files": [ + "index.js", + "LICENSE" + ], "scripts": { "lint": "eslint . && jscs index.js test/", "pretest": "npm run lint", @@ -20,7 +24,7 @@ "coveralls": "npm run cover && istanbul-coveralls" }, "dependencies": { - "async-done": "^1.1.1" + "async-done": "^1.2.2" }, "devDependencies": { "eslint": "^1.7.3",