Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 1.85 KB

README.md

File metadata and controls

36 lines (22 loc) · 1.85 KB

remark-cite

Following convention, this repository contains three separate npm packages related to support for pandoc-style citation syntax for the remark Markdown parser.

  • micromark-extension-cite defines a new syntax extension for micromark, which is responsible for converting markdown syntax to a token stream
  • mdast-util-cite describes how to convert tokens output by micromark-extension-cite into either an HTML string or mdast syntax tree.
  • remark-cite encapsulates the above functionality into a remark plugin.

For more information, see the individual folders for each package.

Contributing

Pull requests for bugfixes or new features / options are welcome. Be aware that changes to the syntax extension micromark-extension-cite may also have an impact on the other two packages, and you will need to test all three.

Development

Build dependencies, in order:

lerna run build

Publishing

lerna publish --no-private

Publishing Guide

(this section is for myself, so I don't forget how to publish the packages :) )

It seems that npm version does not work properly from subdirectories, so we use lerna instead. However, lerna publish does not properly erase workspace protocol markers when publishing from pnpm monorepos, so we have to publish the packages in two steps:

  1. First, increment all package versions by running lerna version from the project root.
  2. Next, use lerna run publish-pnpm, which calls the `publish-pnpm" script for all packages.