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

convert README to Markdown before publishing package #411

Merged
merged 1 commit into from Jan 19, 2018

Conversation

mojavelinux
Copy link
Member

  • move AsciiDoc README to the side
  • convert AsciiDoc README to Markdown
  • allow pack to include README.md in package
  • restore AsciiDoc README after publishing

- move AsciiDoc README to the side
- convert AsciiDoc README to Markdown
- allow pack to include README.md in package
- restore AsciiDoc README after publishing
@mojavelinux
Copy link
Member Author

This will restore the README on npmjs. It will also improve the appearance of the README.

We're still using some Markdown formatting in the README, but that just makes it a little easier to convert.

@mojavelinux
Copy link
Member Author

While we continue to lobby for AsciiDoc support on npm, we at least want to have something to display. You can see an example here: https://www.npmjs.com/package/bespoke-overview


const RefMacroRx = new RegExp('(image:)?(?:(https?:[^\\[]+)|\{([a-z0-9_-]+)\})\\[(|.*?[^\\\\])\\]', 'g');

function markdownify (asciidoc) {
Copy link
Member

Choose a reason for hiding this comment

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

It's clever, I think we should share this code as part of a library 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree. That would avoid a lot of copy-paste between projects. My only hesitation is that this kind of a quick hack, so putting it on npm might give people the impression that it's a general purpose converter. I suppose we could name it accordingly.

This converter is more comprehensive than the one I used for bespoke-overview since this README is more advanced.

Copy link
Member

Choose a reason for hiding this comment

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

My only hesitation is that this kind of a quick hack, so putting it on npm might give people the impression that it's a general purpose converter. I suppose we could name it accordingly.

I had thought about it but as you said we can name it accordingly and state in the README that this converter is not a general purpose converter. But still I think it can be very useful 👍

@ggrossetie
Copy link
Member

Looking forward to see it in action!

@ggrossetie ggrossetie merged commit 2172991 into asciidoctor:master Jan 19, 2018
@ggrossetie
Copy link
Member

The README is (finally) looking gorgeous on npmjs 🎉 🎉 🎉
https://www.npmjs.com/package/asciidoctor.js

Thanks @mojavelinux 😄

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.

None yet

2 participants