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

Support --no-output option #69

Merged
merged 6 commits into from
Feb 2, 2019
Merged

Support --no-output option #69

merged 6 commits into from
Feb 2, 2019

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Feb 2, 2019

I've refactored processing converted file, and Marp CLI allows --no-output option now. The converted result won't be outputted to anywhere.

It is useful to preview Markdown from stdin instantly.

# Previous way
echo '# Hello!' | marp -p -o - > /dev/null

# Improved way
echo '# Hello!' | marp -p --no-output

In addition, Marp CLI has improved message when processed Markdown in server mode. Previously, the outputted log has looked like saved the converted HTML to file. But actually, it is not saved.

# Previous (A file won't saved actually)
[  INFO ] [Server mode] Start server listened at http://localhost:8080/ ...
[  INFO ] ..\..\..\Documents\marp-cli\test.md => ..\..\..\Documents\marp-cli\test.html

# Improved
[  INFO ] [Server mode] Start server listened at http://localhost:8080/ ...
[  INFO ] ..\..\..\Documents\marp-cli\test.md processed.

These improvements were realized by refactoring to add FileType.Null support.

@yhatt yhatt merged commit 20abbaa into master Feb 2, 2019
@yhatt yhatt deleted the no-output branch February 2, 2019 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant