diff --git a/lib/middleware/help.js b/lib/middleware/help.js index c9f20a4..f6bb249 100644 --- a/lib/middleware/help.js +++ b/lib/middleware/help.js @@ -1,15 +1,16 @@ var helpers = require("./util/helpers") +var chalk = require('chalk') module.exports = function(req, next){ if (req.argv.help || req.argv.h || req.argv["_"][0] === "help") { helpers .log() - .log(" Surge".bold, "– Single-command web publishing.", ("(v" + req.pkg.version + ")"). grey) + .log(" Surge".bold, "– Single-command web publishing.", chalk.dim("(v" + req.pkg.version + ")")) .log() - .log(" Usage:".grey) + .log(chalk.dim(" Usage:")) .log(" surge [options]") .log() - .log(" Options:".grey) + .log(chalk.dim(" Options:")) .log(" -p, --project path to projects asset directory (./)") .log(" -d, --domain domain of your project (.surge.sh)") .log(" -e, --endpoint domain of API server (surge.sh)") @@ -18,22 +19,22 @@ module.exports = function(req, next){ .log(" -V, --version show the version number") .log(" -h, --help show this help message") .log() - .log(" Shorthand usage:".grey) + .log(chalk.dim(" Shorthand usage:")) .log(" surge [project path] [domain]") .log() - .log(" Additional commands:".grey) + .log(chalk.dim(" Additional commands:")) .log(" surge whoami show who you are logged in as") .log(" surge logout expire local token") .log(" surge login only performs authentication step") .log(" surge list list all domains you have access to") .log(" surge teardown tear down a published project") .log() - .log(" Guides:".grey) - .log(" Getting started " + "surge.sh/help/getting-started-with-surge".underline.grey) - .log(" Custom domains " + "surge.sh/help/adding-a-custom-domain".underline.grey) - .log(" Additional help " + "surge.sh/help".underline.grey) + .log(chalk.dim(" Guides:")) + .log(" Getting started " + chalk.dim.underline("surge.sh/help/getting-started-with-surge")) + .log(" Custom domains " + chalk.dim.underline("surge.sh/help/adding-a-custom-domain")) + .log(" Additional help " + chalk.dim.underline("surge.sh/help")) .log() - .log(" When in doubt, run ".grey + "surge".green.underline + " from within you project directory.".grey) + .log(chalk.dim(" When in doubt, run ") + chalk.green.underline("surge") + chalk.dim(" from within you project directory.")) .log() } else { diff --git a/package.json b/package.json index d40e0ea..dabb831 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "minimist": "1.1.1" }, "devDependencies": { + "chalk": "1.1.1", "mocha": "*" }, "license": "ISC",