feat(package): modernize package metadata, typings, and test setup for ESM builds
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user