Commit 0036053c authored by Aral Balkan's avatar Aral Balkan

Tweak usage instructions order for consistency

parent f2324486
......@@ -75,15 +75,15 @@ const command = {
const didMatchCommand = Object.values(command).reduce((p,n) => p || n)
command.isDev = (arguments.dev || firstPositionalArgument === 'dev' || !didMatchCommand)
const firstPositionalArgumentDidMatchCommand = ['help', 'version', 'test', 'on', 'off', 'monitor', 'logs', 'info'].reduce((p, n) => p || (firstPositionalArgument === n), false)
const firstPositionalArgumentDidMatchCommand = ['version', 'help', 'test', 'on', 'off', 'monitor', 'logs', 'info'].reduce((p, n) => p || (firstPositionalArgument === n), false)
// Help / usage instructions.
if (command.isHelp) {
const usageCommand = `${clr('command', 'green')}`
const usageFolderToServe = clr('folder', 'cyan')
const usageOptions = clr('options', 'yellow')
const usageHelp = `${clr('help', 'green')}`
const usageVersion = `${clr('version', 'green')}`
const usageHelp = `${clr('help', 'green')}`
const usageDev = `${clr('dev', 'green')}`
const usageTest = `${clr('test', 'green')}`
const usageOn = `${clr('on', 'green')}`
......@@ -99,7 +99,7 @@ if (command.isHelp) {
${clr('web-server', 'bold')} [${usageCommand}] [${usageFolderToServe}] [${usageOptions}]
${usageCommand}\t${usageHelp} | ${usageVersion} | ${usageDev} | ${usageTest} | ${usageOn} | ${usageOff} | ${usageMonitor} | ${usageLogs} | ${usageInfo}
${usageCommand}\t${usageVersion} | ${usageHelp} | ${usageDev} | ${usageTest} | ${usageOn} | ${usageOff} | ${usageMonitor} | ${usageLogs} | ${usageInfo}
${usageFolderToServe}\tPath of folder to serve (defaults to current folder).
${usageOptions}\tSettings that alter server characteristics.
......@@ -114,7 +114,7 @@ if (command.isHelp) {
When server is on, you can also use:
${usageOff}\t\tTake server offline and remove it from startup items.
${usageOff}\t\tTurn server off and remove it from startup items.
${usageMonitor}\tMonitor server state.
${usageLogs}\t\tDisplay and tail server logs.
${usageInfo}\t\tDisplay detailed server information.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment