diff --git a/.gitignore b/.gitignore index 9dbbbc2..5bc0c8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.d.ts !**/types/index.d.ts +!/dev/type-references.d.ts *.log /node_modules /.vscode diff --git a/dev/index.js b/dev/index.js index f11c511..d2bd506 100644 --- a/dev/index.js +++ b/dev/index.js @@ -1,6 +1,3 @@ -/// -/// - /** @import { Processor } from "unified" */ import {abbr} from './lib/micromark-extension-abbr/syntax.js' import {abbrFromMarkdown} from './lib/mdast-util-abbr/index.js' diff --git a/dev/type-references.d.ts b/dev/type-references.d.ts new file mode 100644 index 0000000..f2a66b7 --- /dev/null +++ b/dev/type-references.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/package.json b/package.json index 881d9c8..9dd540f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "index.d.ts" ], "scripts": { - "build": "tsc --build --clean && tsc --build && type-coverage && micromark-build", + "build": "tsc --build --clean && tsc --build && type-coverage && micromark-build && npm run munge-type-references", + "munge-type-references": "cat type-references.d.ts index.d.ts > tmp.d.ts && mv tmp.d.ts index.d.ts && rm type-references.d.ts", "format": "prettier . -w --log-level warn && xo --fix", "test-dev": "node --conditions development --test", "test-prod": "node --conditions production --test",