forked from souporserious/mdx-to-md
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d357cae
commit 862dc1e
Showing
11 changed files
with
352 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { name, description } from "../../package.json" | ||
import { name, description } from "../package.json" | ||
|
||
# {name} | ||
|
||
{description} | ||
|
||
# Install | ||
|
||
```tsx | ||
yarn add {name} | ||
``` | ||
<pre> | ||
<code className="language-bash">yarn add {name}</code> | ||
</pre> | ||
|
||
```tsx | ||
npm install {name} | ||
``` | ||
<pre> | ||
<code className="language-bash">npm install {name}</code> | ||
</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,29 @@ | ||
import { test } from "uvu" | ||
import { resolve } from "path" | ||
import * as assert from "uvu/assert" | ||
import { mdxToMd } from "../src" | ||
|
||
const snapshot = ` | ||
# mdx-to-md | ||
Convert MDX to Markdown. | ||
# Install | ||
\`\`\`bash | ||
yarn add mdx-to-md | ||
\`\`\` | ||
\`\`\`bash | ||
npm install mdx-to-md | ||
\`\`\` | ||
`.trim() | ||
|
||
test("Converts MDX to Markdown", async () => { | ||
const markdown = await mdxToMd("./test.mdx", { cwd: __dirname }) | ||
console.log(markdown) | ||
const path = resolve(__dirname, "test.mdx") | ||
const markdown = await mdxToMd(path) | ||
|
||
assert.equal(markdown, snapshot) | ||
}) | ||
|
||
test.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import { name, description } from "../../package.json" | ||
import Lead from "./lead" | ||
import Lead from "./lead.mdx" | ||
|
||
<Lead name={name} description={description} /> | ||
<Lead /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.