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
+16 -3
View File
@@ -1,12 +1,16 @@
/// <reference path="./smartmarkdown.types.d.ts" />
// pushrocks scope
import * as smartyaml from '@push.rocks/smartyaml';
export {
smartyaml
}
};
// third party remark
import { unified } from 'unified';
import type { Plugin, Transformer } from 'unified';
import type { Root, RootContent } from 'mdast';
import remarkGfm from 'remark-gfm';
import remarkParse from 'remark-parse';
import remarkFrontmatter from 'remark-frontmatter';
@@ -14,10 +18,19 @@ import remarkHtml from 'remark-html';
import remarkStringify from 'remark-stringify';
export { unified, remarkGfm, remarkParse, remarkFrontmatter, remarkHtml, remarkStringify };
export type { Plugin, Transformer, Root, RootContent };
// other third party stuff
import turndown from 'turndown';
// @ts-ignore
import * as turndownPluginGfm from 'turndown-plugin-gfm';
import * as rawTurndownPluginGfm from 'turndown-plugin-gfm';
type TTurndownPlugin = (serviceArg: InstanceType<typeof turndown>) => void;
const turndownPluginGfm = rawTurndownPluginGfm as {
gfm: TTurndownPlugin;
strikethrough: TTurndownPlugin;
tables: TTurndownPlugin;
taskListItems: TTurndownPlugin;
};
export { turndown, turndownPluginGfm };