From ff84edd2f27f9c8c4a86ba82e87cc80fb9ab8a5e Mon Sep 17 00:00:00 2001 From: Tom Gao Date: Mon, 1 Jul 2024 23:56:55 +0800 Subject: [PATCH] docs: change api doc --- README.md | 5 ++--- README.zh_CN.md | 5 ++--- package.json | 12 ++++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 23d0e6b..ae28654 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @tomjs/vite-plugin-html -[![npm](https://img.shields.io/npm/v/@tomjs/vite-plugin-html)](https://www.npmjs.com/package/@tomjs/vite-plugin-html) ![node-current (scoped)](https://img.shields.io/node/v/@tomjs/vite-plugin-html) ![NPM](https://img.shields.io/npm/l/@tomjs/vite-plugin-html) [![Docs](https://www.paka.dev/badges/v0/cute.svg)](https://www.paka.dev/npm/@tomjs/vite-plugin-html) +[![npm](https://img.shields.io/npm/v/@tomjs/vite-plugin-html)](https://www.npmjs.com/package/@tomjs/vite-plugin-html) ![node-current (scoped)](https://img.shields.io/node/v/@tomjs/vite-plugin-html) ![NPM](https://img.shields.io/npm/l/@tomjs/vite-plugin-html) [![Docs](https://img.shields.io/badge/API-unpkg-orange)](https://www.unpkg.com/browse/@tomjs/vite-plugin-html/dist/index.d.ts) **English** | [中文](./README.zh_CN.md) @@ -23,7 +23,7 @@ yarn add @tomjs/vite-plugin-html -D With `npm` ```bash -npm i @tomjs/vite-plugin-html --save-dev +npm add @tomjs/vite-plugin-html -D ``` ## Usage @@ -82,7 +82,6 @@ export default defineConfig({ #### Documentation -- [API Documentation](https://paka.dev/npm/@tomjs/vite-plugin-html) provided by [paka.dev](https://paka.dev). - [index.d.ts](https://www.unpkg.com/browse/@tomjs/vite-plugin-html/dist/index.d.ts) provided by [unpkg.com](https://www.unpkg.com). #### Parameters diff --git a/README.zh_CN.md b/README.zh_CN.md index ead3c2f..05676e0 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -1,6 +1,6 @@ # @tomjs/vite-plugin-html -[![npm](https://img.shields.io/npm/v/@tomjs/vite-plugin-html)](https://www.npmjs.com/package/@tomjs/vite-plugin-html) ![node-current (scoped)](https://img.shields.io/node/v/@tomjs/vite-plugin-html) ![NPM](https://img.shields.io/npm/l/@tomjs/vite-plugin-html) [![Docs](https://www.paka.dev/badges/v0/cute.svg)](https://www.paka.dev/npm/@tomjs/vite-plugin-html) +[![npm](https://img.shields.io/npm/v/@tomjs/vite-plugin-html)](https://www.npmjs.com/package/@tomjs/vite-plugin-html) ![node-current (scoped)](https://img.shields.io/node/v/@tomjs/vite-plugin-html) ![NPM](https://img.shields.io/npm/l/@tomjs/vite-plugin-html) [![Docs](https://img.shields.io/badge/API-unpkg-orange)](https://www.unpkg.com/browse/@tomjs/vite-plugin-html/dist/index.d.ts) [English](./README.md) | **中文** @@ -23,7 +23,7 @@ yarn add @tomjs/vite-plugin-html -D 使用 `npm` ```bash -npm i @tomjs/vite-plugin-html --save-dev +npm add @tomjs/vite-plugin-html -D ``` ## 使用说明 @@ -82,7 +82,6 @@ export default defineConfig({ #### 文档 -- [paka.dev](https://paka.dev) 提供的 [API文档](https://paka.dev/npm/@tomjs/vite-plugin-html). - [unpkg.com](https://www.unpkg.com/) 提供的 [index.d.ts](https://www.unpkg.com/browse/@tomjs/vite-plugin-html/dist/index.d.ts). #### 参数 diff --git a/package.json b/package.json index 08958da..c03eb01 100644 --- a/package.json +++ b/package.json @@ -34,10 +34,13 @@ "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "exports": { - ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", + "require": { + "default": "./dist/index.js", "types": "./dist/index.d.ts" + }, + "import": { + "default": "./dist/index.mjs", + "types": "./dist/index.d.mts" } }, "scripts": { @@ -87,5 +90,6 @@ "tsx": "^4.7.0", "typescript": "~5.3.3", "vite": "^5.0.10" - } + }, + "packageManager": "pnpm@8.15.8" }