Skip to content

Commit

Permalink
Fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ritch authored and raymondfeng committed Oct 23, 2018
1 parent fd21266 commit 60c0da0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/strong-docs/bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ var express = require('express');
var configPath = argv.config || argv.c || 'docs.json';
var config;
var outputPath = argv.out || argv.o;
var previewMode = argv.preview || argv.p;
var showHelp = argv.help || argv.h || !(outputPath || previewMode);

/*
* Display help text
*/

if(argv.help || argv.h) {
if(showHelp) {
console.log(fs.readFileSync(path.join(__dirname, 'help.txt'), 'utf8'));
process.exit();
}
Expand Down Expand Up @@ -44,7 +46,7 @@ var assets = config.assets
* Preview mode
*/

if(argv.preview || argv.p) {
if(previewMode) {
var app = express();
app.use(express.static(path.join(__dirname, '..', 'public')));
if(assets) {
Expand Down

0 comments on commit 60c0da0

Please sign in to comment.