diff --git a/package.json b/package.json index e169699..06e7758 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { "name": "mark-mark-parsers-renderers", - "version": "0.1.3", + "version": "0.1.4", "description": "A TypeScript MarkMark parser/renderer collection", "homepage": "https://garrettmills.dev/markmark", "main": "lib/index.js", "types": "lib/index.d.ts", + "type": "module", "directories": { "lib": "lib" }, diff --git a/src/index.ts b/src/index.ts index 4fca99e..adfb3f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,3 @@ -export * from './types' -export * from './parser' -export * from './renderers' \ No newline at end of file +export * from './types.js' +export * from './parser.js' +export * from './renderers/index.js' \ No newline at end of file diff --git a/src/parser.ts b/src/parser.ts index 7966691..854e633 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -1,5 +1,5 @@ import * as marked from 'marked' -import {FrontMatter, isNamedSection, Link, MarkMark, Section} from './types' +import {FrontMatter, isNamedSection, Link, MarkMark, Section} from './types.js' import * as hasha from 'hasha' export class Parser { diff --git a/src/renderers/html.ts b/src/renderers/html.ts index 3b035b8..5b03695 100644 --- a/src/renderers/html.ts +++ b/src/renderers/html.ts @@ -1,5 +1,5 @@ import * as marked from 'marked' -import {isNamedSection, MarkMark} from '../types' +import {isNamedSection, MarkMark} from '../types.js' export class HtmlRenderer { public render(mm: MarkMark): string { diff --git a/src/renderers/index.ts b/src/renderers/index.ts index f7769b8..e5255d4 100644 --- a/src/renderers/index.ts +++ b/src/renderers/index.ts @@ -1,2 +1,2 @@ -export * from './html' -export * from './markmark' +export * from './html.js' +export * from './markmark.js' diff --git a/src/renderers/markmark.ts b/src/renderers/markmark.ts index 0f8156f..063f556 100644 --- a/src/renderers/markmark.ts +++ b/src/renderers/markmark.ts @@ -1,4 +1,4 @@ -import {isNamedSection, MarkMark} from '../types' +import {isNamedSection, MarkMark} from '../types.js' export class MarkMarkRenderer { public render(mm: MarkMark, frontmatter: boolean = true): string { diff --git a/tsconfig.json b/tsconfig.json index 1989580..2d88d06 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es2016", - "module": "commonjs", + "module": "nodenext", "declaration": true, "outDir": "./lib", "strict": true,