Project: micromark/micromark

Package: micromark-build@1.3.0

  1. Dependents: 0
  2. Build production files from dev files
  1. micromark 37
  2. build 3


Build Coverage Sponsors Backers Chat

Tiny tool to help us maintain micromark and the micromark extensions.


What is this?

This package is a small CLI to build micromark development source code (for this monorepo but also for extensions and integrations) into production code.

If you are making a micromark extension or are otherwise integrating with its code, you should use this.

State machines are hard: assertions, debugging messages, and readable names are great to develop with, but slow or big in production, this solves that.

When should I use this?

This package is useful when you are making your own micromark extensions.


In Node.js (version 16+), install with npm:

npm install micromark-build --save-dev


Say we have this folder (called my-micromark-extension):


And we add micromark-build in a build script in package.json:

"scripts": {
  "build": "micromark-build"

Now, running that with npm run build, we’d get:


To expose the production code by default, and the dev/ files on a condition, use an export map in package.json:

"exports": {
  "development": "./dev/index.js",
  "default": "./index.js"

Users can then use node --conditions development to use the dev files.


There is no interface and there are no options. See Use above: run it and get files out.

The following Babel plugins are used:

You should use devlop, debug, and micromark-util-symbol to develop micromark extensions!


This package is fully typed with TypeScript. It exports no additional types.


Projects maintained by the unified collective are compatible with maintained versions of Node.js.

When we cut a new major release, we drop support for unmaintained versions of Node. This means we try to keep the current release line, micromark-build@^2, compatible with Node.js 16.


See security.md in micromark/.github for how to submit a security report.


See contributing.md in micromark/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.


MIT © Titus Wormer