diff --git a/index.js b/index.js deleted file mode 100644 index 56e503f..0000000 --- a/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import rehypePrismGenerator from './src/generator.js' -import rehypePrismCommon from './src/common.js' -import rehypePrism from './src/all.js' - -export { rehypePrismGenerator, rehypePrismCommon } -export default rehypePrism diff --git a/package.json b/package.json index 0db30af..a00f7a9 100644 --- a/package.json +++ b/package.json @@ -6,26 +6,26 @@ "files": [ "dist" ], - "main": "./dist/rehype-prism-plus.es.js", - "module": "./dist/rehype-prism-plus.es.js", + "main": "./dist/index.es.js", + "module": "./dist/index.es.js", "types": "./dist/index.d.ts", "type": "module", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/rehype-prism-plus.es.js" + "default": "./dist/index.es.js" }, "./common": { - "types": "./dist/src/common.d.ts", - "import": "./dist/common.es.js" + "types": "./dist/common.d.ts", + "default": "./dist/common.es.js" }, "./all": { - "types": "./dist/src/all.d.ts", - "import": "./dist/all.es.js" + "types": "./dist/all.d.ts", + "default": "./dist/all.es.js" }, "./generator": { - "types": "./dist/src/generator.d.ts", - "import": "./dist/generator.es.js" + "types": "./dist/generator.d.ts", + "default": "./dist/generator.es.js" } }, "typesVersions": { @@ -34,18 +34,18 @@ "./dist/index" ], "common": [ - "./dist/src/common" + "./dist/common" ], "all": [ - "./dist/src/all" + "./dist/all" ], "generator": [ - "./dist/src/generator" + "./dist/generator" ] } }, "scripts": { - "build": "tsc -b && microbundle index.js src/common.js src/all.js src/generator.js --format esm", + "build": "tsc -b && microbundle src/index.js src/common.js src/all.js src/generator.js --format esm", "tsc": "tsc --watch", "lint": "eslint .", "prettier": "prettier --write '*.js'", diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..88d7776 --- /dev/null +++ b/src/index.js @@ -0,0 +1,6 @@ +import rehypePrismGenerator from './generator.js' +import rehypePrismCommon from './common.js' +import rehypePrism from './all.js' + +export { rehypePrismGenerator, rehypePrismCommon } +export default rehypePrism diff --git a/test.js b/test.js index 9d8754b..afa47b6 100644 --- a/test.js +++ b/test.js @@ -7,7 +7,7 @@ import remarkParse from 'remark-parse' import remarkRehype from 'remark-rehype' import rehypeStringify from 'rehype-stringify' import dedent from 'dedent' -import rehypePrism from './index.js' +import rehypePrism from './src/index.js' /** * Mock meta in code block diff --git a/tsconfig.json b/tsconfig.json index bc222d6..348908e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "include": ["index.js", "src/*"], + "include": ["src/*"], "compilerOptions": { "target": "ES2020", "lib": ["ES2020"],