Skip to content

Commit

Permalink
Merge pull request #31 from tschaub/lint
Browse files Browse the repository at this point in the history
Updated linter and assorted dependencies.
  • Loading branch information
tschaub committed Dec 2, 2015
2 parents 08e470c + 36b87f1 commit 54d0b0c
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 122 deletions.
20 changes: 0 additions & 20 deletions .jshintrc

This file was deleted.

1 change: 0 additions & 1 deletion lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ var fs = require('q-io/fs');
var git = 'git';



/**
* @constructor
* @param {number} code Error code.
Expand Down
18 changes: 10 additions & 8 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var wrench = require('wrench');
var _ = require('lodash');
var glob = require('glob');

var pkg = require('../package.json');
var git = require('./git');

var copy = require('./util').copy;
Expand Down Expand Up @@ -48,6 +47,9 @@ function getRepo(options) {

/**
* Push a git branch to a remote (pushes gh-pages by default).
* @param {string} basePath The base path.
* @param {Object} config Publish options.
* @param {Function} done Callback.
*/
exports.publish = function publish(basePath, config, done) {
if (typeof config === 'function') {
Expand Down Expand Up @@ -179,14 +181,14 @@ exports.publish = function publish(basePath, config, done) {
var deferred = Q.defer();
git.tag(options.tag, options.clone)
.then(function() {
return deferred.resolve();
})
return deferred.resolve();
})
.fail(function(error) {
// tagging failed probably because this tag alredy exists
log('Tagging failed, continuing');
options.logger(error);
return deferred.resolve();
});
// tagging failed probably because this tag alredy exists
log('Tagging failed, continuing');
options.logger(error);
return deferred.resolve();
});
return deferred.promise;
} else {
return Q.resolve();
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function makeDir(path, callback) {
* @param {string} dest Destination directory.
* @return {Promise} A promise.
*/
var copy = exports.copy = function(files, base, dest) {
exports.copy = function(files, base, dest) {
var deferred = Q.defer();

var pairs = [];
Expand Down
25 changes: 15 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,29 @@
},
"main": "lib/index.js",
"scripts": {
"test": "node tasks.js lint test"
"pretest": "eslint lib test",
"test": "mocha --recursive test"
},
"dependencies": {
"async": "0.2.9",
"commander": "~2.8.1",
"async": "1.5.0",
"commander": "2.9.0",
"glob": "~4.0.2",
"graceful-fs": "2.0.1",
"graceful-fs": "4.1.2",
"lodash": "~2.4.1",
"q": "~1.0.1",
"q-io": "~1.11.0",
"wrench": "1.5.1"
"q": "1.4.1",
"q-io": "1.13.2",
"wrench": "1.5.8"
},
"devDependencies": {
"mocha": "~1.18.2",
"jshint": "~2.4.4",
"chai": "~1.9.1"
"chai": "^3.4.1",
"eslint": "^1.10.3",
"eslint-config-tschaub": "^2.0.0",
"mocha": "^2.3.4"
},
"bin": {
"gh-pages": "bin/gh-pages"
},
"eslintConfig": {
"extends": "tschaub"
}
}
56 changes: 0 additions & 56 deletions tasks.js

This file was deleted.

26 changes: 0 additions & 26 deletions test/.jshintrc

This file was deleted.

1 change: 1 addition & 0 deletions test/lib/util.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-env mocha */
var path = require('path');

var assert = require('../helper').assert;
Expand Down

0 comments on commit 54d0b0c

Please sign in to comment.