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

Rewrote a preview feature for supporting the regular conversion and multiple files #47

Merged
merged 32 commits into from
Dec 19, 2018

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Dec 17, 2018

This PR will apply the rewritten preview feature for supporting the regular conversion and multiple files.

I rewrote Preview class based on EventEmitter, and wrapped Carlo. It supports multiple windows, so Marp CLI can use --preview option with the regular conversion.

⚠️ Breaking

By lacked Node 6 support in Carlo, it is hard to keep maintaining to support Node 6. Thus, we have dropped Node 6 support in this PR. The EOL of Boron LTS will reach in next April. You have to upgrade Node to >= 8 LTS if you still use Boron.

ToDo

  • Fix tests for Preview class
    • Remove unit test for current Preview class
    • Add unit test for rewritten Preview class
  • Add test case in regular conversion

test/preview.ts Outdated
await instance.carlo
.browserForTest()
.process()
.kill()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First I tried await instance.carlo.browserForTest().close(), but sometimes it throws read ECONNRESET in remaining tests.

@yhatt yhatt changed the title [WIP] Rewrote a preview feature for supporting the regular conversion and multiple files Rewrote a preview feature for supporting the regular conversion and multiple files Dec 19, 2018
@yhatt yhatt merged commit 05f6b3b into master Dec 19, 2018
@yhatt yhatt deleted the support-multi-preview-windows branch December 19, 2018 03:04
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