Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cover kni command compiled json mode #53

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
kni: send json to stdout
Also terminate modal output control flow
  • Loading branch information
jcorbin committed Mar 4, 2021
commit 70b51382cb065491a3c9b8313840d40bc12ccee2
8 changes: 5 additions & 3 deletions kni.js
Original file line number Diff line number Diff line change
@@ -125,10 +125,12 @@ function run(args, out, done) {
}

if (config.toJson) {
console.log(JSON.stringify(states, null, 4), done);
interactive = false;
// TODO streaming json encoder?
out.write(JSON.stringify(states, null, 4), done);
return;
}

} else if (config.toHtml) {
if (config.toHtml) {
makeHtml(states, config.toHtml, {
title: config.htmlTitle,
color: config.htmlColor,