From 041880f813caefa5e0f1d70a545799a1957dc8cd Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Mon, 21 Jul 2014 16:51:24 +0200 Subject: [PATCH 01/10] chore(npm): update dependencies --- package.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 1ee231d..03a12c0 100644 --- a/package.json +++ b/package.json @@ -4,20 +4,20 @@ "version": "0.4.14", "preferGlobal": true, "dependencies": { + "async": "0.2.9", + "cli-color": "0.2.2", "colors": "0.6.x", + "graceful-fs": "2.0.1", + "ini": "1.1.0", + "npm": "1.4.2", + "open": "0.0.4", "optimist": "0.6.x", - "cli-color": "0.2.2", "prompt": "0.2.12", - "update-notifier": "0.1.3", - "open": "0.0.4", - "async": "0.2.9", - "graceful-fs": "2.0.1", - "underscore": "1.5.2", "rimraf": "2.2.2", - "shelljs": "0.2.6", - "ini": "1.1.0", "semver": "2.2.1", - "npm": "1.4.2" + "shelljs": "0.2.6", + "underscore": "1.5.2", + "update-notifier": "0.1.3" }, "engines": { "node": ">=0.10.22" @@ -25,7 +25,7 @@ "keywords": [ "cli", "hoodie", - "hood.io", + "hood.ie", "hoodie.js" ], "repository": { @@ -40,7 +40,7 @@ }, "author": { "name": "Sven Lito", - "email": "me@svenlito.com" + "email": "sven@thehoodiefirm.com" }, "devDependencies": { "grunt": "~0.4.1", From 7b1076e2eaa1e883e4dc2e2e5da1cd6d5a2b98df Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Mon, 21 Jul 2014 16:52:25 +0200 Subject: [PATCH 02/10] refactor(utils): move helper functions --- lib/hoodie/new.js | 5 ----- lib/hoodie/util/dir.js | 26 ++++++++++---------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/lib/hoodie/new.js b/lib/hoodie/new.js index 991b07e..97ecd56 100644 --- a/lib/hoodie/new.js +++ b/lib/hoodie/new.js @@ -1,6 +1,5 @@ var Command = require('./util/command'); var npmutils = require('./util/npm'); -var gitUtils = require('./util/git'); var dirUtils = require('./util/dir'); var util = require('util'); @@ -16,10 +15,6 @@ function CreateCommand() { util.inherits(CreateCommand, Command); -function appDir(options) { - return path.join(options.cwd, options.name); -} - // // Create a New App. // diff --git a/lib/hoodie/util/dir.js b/lib/hoodie/util/dir.js index f958405..4487797 100644 --- a/lib/hoodie/util/dir.js +++ b/lib/hoodie/util/dir.js @@ -1,6 +1,4 @@ var path = require('path'); -var fs = require('fs'); -var shell = require('shelljs'); // // get is cache dir @@ -18,24 +16,11 @@ exports.getCacheDir = function () { }; -// -// Ensure the cache directory exists. For first install on Windows, it doesn't. -// -exports.ensureCacheDir = function (options, ctx, callback) { - var cacheDir = exports.getCacheDir(); - - if (!fs.existsSync(cacheDir)) { - shell.mkdir('-p', cacheDir); - } - - return callback(null); -}; - // // build repo url // exports.buildGitURI = function (options) { - var protocols = ['https://', 'git@']; + var protocols = ['git@', 'https://']; var separator = ['/', ':']; var host = 'github.com'; @@ -45,3 +30,12 @@ exports.buildGitURI = function (options) { return cProtocol + host + cSeparator + options.template.entity + separator[0] + options.template.repo + '.git'; }; + +// +// returns application name +// + +exports.appDir = function (options) { + return path.join(options.cwd, options.name); +}; + From d7306fc8578b03ca6314f5539577db53e30e5b8f Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Mon, 21 Jul 2014 16:53:25 +0200 Subject: [PATCH 03/10] refactor(options): removing keep git template option as we're no longer installing via git (yay!) --- doc/cli/help.new.txt | 1 - lib/cli/new.js | 1 - spec/cli/new.spec.js | 11 +---------- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/doc/cli/help.new.txt b/doc/cli/help.new.txt index c18156d..9ab2528 100644 --- a/doc/cli/help.new.txt +++ b/doc/cli/help.new.txt @@ -9,7 +9,6 @@ Options: --name, -n application name --template, -t