From 7e9660efd35a83e286741ab7ef9055b7d8bf2dc8 Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Wed, 10 Jun 2015 15:12:15 -0400 Subject: [PATCH] Fix "--help" distinguish optional transforms --- packages/babel-cli/bin/babel/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/babel-cli/bin/babel/index.js b/packages/babel-cli/bin/babel/index.js index 4f27e33493..40d2ddd712 100755 --- a/packages/babel-cli/bin/babel/index.js +++ b/packages/babel-cli/bin/babel/index.js @@ -35,7 +35,7 @@ each(options, function (option, key) { if (option.description) desc.push(option.description); commander.option(arg, desc.join(" ")); -}) +}); commander.option("-x, --extensions [extensions]", "List of extensions to compile when a directory has been input [.es6,.js,.es,.jsx]"); commander.option("-w, --watch", "Recompile files on changes"); @@ -51,7 +51,7 @@ commander.on("--help", function () { each(keys(obj).sort(), function (key) { if (key[0] === "_") return; - if (obj[key].optional) key = "[" + key + "]"; + if (obj[key].metadata.optional) key = "[" + key + "]"; console.log(" - " + key); });