Comparing version 0.7.0 to 0.8.0
@@ -0,1 +1,9 @@ | ||
## v0.8.0 | ||
* [#38](https://github.com/tschaub/gh-pages/pull/38) - Update all dependencies 🌴 ([@tschaub](https://github.com/tschaub)) | ||
* [#39](https://github.com/tschaub/gh-pages/pull/39) - Add message option to cli. ([@markdalgleish](https://github.com/markdalgleish)) | ||
* [#37](https://github.com/tschaub/gh-pages/pull/37) - Rework callback error handling. ([@tschaub](https://github.com/tschaub)) | ||
* [#36](https://github.com/tschaub/gh-pages/pull/36) - Better error handling. ([@timaschew](https://github.com/timaschew)) | ||
* [#35](https://github.com/tschaub/gh-pages/pull/35) - Make CLI exit with error if publishing fails. ([@timaschew](https://github.com/timaschew)) | ||
## v0.7.0 | ||
@@ -2,0 +10,0 @@ |
@@ -51,7 +51,7 @@ var path = require('path'); | ||
* @param {Object} config Publish options. | ||
* @param {Function} done Callback. | ||
* @param {Function} callback Callback. | ||
*/ | ||
exports.publish = function publish(basePath, config, done) { | ||
exports.publish = function publish(basePath, config, callback) { | ||
if (typeof config === 'function') { | ||
done = config; | ||
callback = config; | ||
config = {}; | ||
@@ -85,2 +85,24 @@ } | ||
function log(message) { | ||
if (!options.silent) { | ||
options.logger(message); | ||
} | ||
} | ||
if (!callback) { | ||
callback = function(err) { | ||
if (err) { | ||
log(err.message); | ||
} | ||
}; | ||
} | ||
function done(err) { | ||
try { | ||
callback(err); | ||
} catch (err2) { | ||
log('Publish callback threw: ', err2.message); | ||
} | ||
} | ||
try { | ||
@@ -110,8 +132,2 @@ if (!fs.statSync(basePath).isDirectory()) { | ||
function log(message) { | ||
if (!options.silent) { | ||
options.logger(message); | ||
} | ||
} | ||
git.exe(options.git); | ||
@@ -118,0 +134,0 @@ |
{ | ||
"name": "gh-pages", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "Publish to a gh-pages branch on GitHub (or any other branch on any other remote)", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
"scripts": { | ||
"pretest": "eslint lib test", | ||
"pretest": "eslint lib test bin/gh-pages", | ||
"test": "mocha --recursive test" | ||
@@ -32,3 +32,3 @@ }, | ||
"commander": "2.9.0", | ||
"glob": "~4.0.2", | ||
"glob": "~6.0.1", | ||
"graceful-fs": "4.1.2", | ||
@@ -35,0 +35,0 @@ "q": "1.4.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34097
665
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedglob@6.0.4(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
- Removedglob@4.0.6(transitive)
- Removedgraceful-fs@3.0.12(transitive)
- Removedlru-cache@2.7.3(transitive)
- Removedminimatch@1.0.0(transitive)
- Removednatives@1.1.6(transitive)
- Removedsigmund@1.0.1(transitive)
Updatedglob@~6.0.1