diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 71575beba..caf1600be 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,11 +30,3 @@ jobs:
run: npm install --no-package-lock
- name: Run CI Tests
run: npm run ci
- - name: Install markdownlint-micromark Dependencies
- run: npm run install-micromark
- - name: Build markdownlint-micromark
- run: npm run build-micromark
- - name: Install local markdownlint-micromark
- run: npm install --no-package-lock ./micromark
- - name: Test with local markdownlint-micromark
- run: npm test
diff --git a/.gitignore b/.gitignore
index 7fbbcd55d..7a56a13be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,7 @@
coverage
demo/markdown-it.min.js
+demo/markdownlint-browser.js
demo/markdownlint-browser.min.js
-demo/micromark-browser.js
-demo/micromark-html-browser.js
-micromark/micromark.cjs
-micromark/micromark.dev.cjs
-micromark/micromark-browser.js
-micromark/micromark-browser.dev.js
-micromark/micromark-html-browser.js
-micromark/micromark-html-browser.dev.js
node_modules
!test/node_modules
npm-debug.log
diff --git a/.npmignore b/.npmignore
index 0b1a6d4f0..a1867b2ad 100644
--- a/.npmignore
+++ b/.npmignore
@@ -5,13 +5,11 @@
.vscode
coverage
demo/*
-!demo/markdownlint-browser.js
doc-build
eslint.config.mjs
example
-micromark
npm-debug.log
-schema/*.js
+schema/*.mjs
scripts
test
test-repos
diff --git a/README.md b/README.md
index 1aa0d77c3..b91b9baf6 100644
--- a/README.md
+++ b/README.md
@@ -798,12 +798,10 @@ function applyFixes(input, errors) { ... }
Invoking `applyFixes` with the results of a call to lint can be done like so:
```javascript
-const { "sync": markdownlintSync, applyFixes } = require("markdownlint");
+import markdownlint from "../lib/markdownlint.mjs";
-function fixMarkdownlintViolations(content) {
- const fixResults = markdownlintSync({ strings: { content } });
- return applyFixes(content, fixResults.content);
-}
+const fixResults = markdownlint.sync({ "strings": { "content": original } });
+const fixed = markdownlint.applyFixes(original, fixResults.content);
```
## Usage
@@ -811,7 +809,7 @@ function fixMarkdownlintViolations(content) {
Invoke `markdownlint` and use the `result` object's `toString` method:
```javascript
-const markdownlint = require("markdownlint");
+import markdownlint from "../lib/markdownlint.mjs";
const options = {
"files": [ "good.md", "bad.md" ],
@@ -897,10 +895,10 @@ Output:
```
Integration with the [gulp](https://gulpjs.com/) build system is
-straightforward: [`gulpfile.js`](example/gulpfile.js).
+straightforward: [`gulpfile.cjs`](example/gulpfile.cjs).
Integration with the [Grunt](https://gruntjs.com/) build system is similar:
-[`Gruntfile.js`](example/Gruntfile.js).
+[`Gruntfile.cjs`](example/Gruntfile.cjs).
## Browser
@@ -912,11 +910,9 @@ Generate normal and minified scripts with:
npm run build-demo
```
-Then reference `markdownlint` and `micromark` scripts:
+Then reference the `markdownlint` script:
```html
-
-
```
@@ -928,7 +924,7 @@ const options = {
"content": "Some Markdown to lint."
}
};
-const results = window.markdownlint.sync(options).toString();
+const results = window.markdownlint.markdownlint.sync(options).toString();
```
## Examples
diff --git a/demo/browser-exports.mjs b/demo/browser-exports.mjs
new file mode 100644
index 000000000..b1e8acf2d
--- /dev/null
+++ b/demo/browser-exports.mjs
@@ -0,0 +1,9 @@
+// @ts-check
+
+export { default as markdownlint } from "../lib/markdownlint.mjs";
+export { compile, parse, postprocess, preprocess } from "micromark";
+export { directive, directiveHtml } from "micromark-extension-directive";
+export { gfmAutolinkLiteral, gfmAutolinkLiteralHtml } from "micromark-extension-gfm-autolink-literal";
+export { gfmFootnote, gfmFootnoteHtml } from "micromark-extension-gfm-footnote";
+export { gfmTable, gfmTableHtml } from "micromark-extension-gfm-table";
+export { math, mathHtml } from "micromark-extension-math";
diff --git a/demo/default.htm b/demo/default.htm
index 32a8f2045..4c1bc442b 100644
--- a/demo/default.htm
+++ b/demo/default.htm
@@ -34,8 +34,6 @@
-
-