feat(package): modernize package metadata, typings, and test setup for ESM builds

This commit is contained in:
2026-05-01 21:57:01 +00:00
parent 2eae324908
commit 84b4f355f8
14 changed files with 7620 additions and 18980 deletions
+5 -5
View File
@@ -1,4 +1,4 @@
import { expect, tap } from '@push.rocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as smartmarkdown from '../ts/index.js';
let smartMarkdownInstance: smartmarkdown.SmartMarkdown;
@@ -23,15 +23,15 @@ hello: yes
# hello there
`;
const mdParsedResult = await smartMarkdownInstance.getMdParsedResultFromMarkdown(markdownString);
expect(mdParsedResult.frontmatterData.hello).toEqual('yes');
});
tap.test('should convert a html string to markdown', async () => {
const htmlString = '<h1 id="hi">Hi!</h1>\n<h2>This is it!</h2>';
const markdownString = smartMarkdownInstance.htmlToMarkdown(htmlString);
console.log(markdownString);
expect(markdownString).toContain('# Hi!');
expect(markdownString).toContain('## This is it!');
});
tap.start();
export default tap.start();