Skip to content

Commit 9653fce

Browse files
committed
docs(readme): 更新文档
1 parent 6bfcc50 commit 9653fce

File tree

5 files changed

+87
-52
lines changed

5 files changed

+87
-52
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: google-github-actions/release-please-action@v3
17+
with:
18+
release-type: node
19+
package-name:
20+
mtk-tool
21+
- uses: actions/checkout@v3
22+
if: ${{ steps.release.outputs.release_created }}
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 20
26+
registry-url: 'https://registry.npmjs.org'
27+
if: ${{ steps.release.outputs.release_created }}
28+
- run: |
29+
npm install
30+
npm run build
31+
if: ${{ steps.release.outputs.release_created }}
32+
- run: npm publish
33+
env:
34+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
35+
if: ${{ steps.release.outputs.release_created }}

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,22 @@
77
<a href="https://www.npmjs.com/package/vite-plugin-ol-external" target="_blank">
88
<img alt="downloads" src="https://img.shields.io/npm/dt/vite-plugin-ol-external.svg?style=flat">
99
</a>
10-
<a href="https://github.com/vitejs/awesome-vite#helpers" target="_blank">
11-
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome">
12-
</a>
1310
</p>
1411

1512
external openlayers plugin for vite
1613

1714
Can be used in `production` mode without other `rollup` configuration.
1815

19-
## Usage
16+
## 📘 Usage
2017

2118
```bash
22-
npm i vite-plugin-ol-external -D
19+
pnpm add vite-plugin-ol-external -D
2320
```
2421

25-
Add it to `vite.config.js`
22+
Add it to `vite.config.ts`
2623

27-
```js
28-
// vite.config.js
24+
```ts
25+
// vite.config.ts
2926
import { viteExternalOlPlugin } from 'vite-plugin-ol-external'
3027

3128
export default {
@@ -35,7 +32,7 @@ export default {
3532
}
3633
```
3734

38-
## How to work
35+
## 🔨 How to work
3936

4037
transform source code of js file.
4138

@@ -70,7 +67,7 @@ export default {
7067

7168
If an error occurs, you can check whether the error is caused by the plugin order.
7269

73-
## Configuration
70+
## 📜 Configuration
7471

7572
### disableInServe
7673

@@ -106,3 +103,6 @@ const Map = ol.Map
106103
### sourceMapOptions
107104

108105
The configuration item of the code sourcemap after code conversion. The library is `magic-string`.
106+
107+
## 💖 reference
108+
> [vite-plugin-externals](https://github.com/crcong/vite-plugin-externals)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"bumpp": "^9.2.0",
4848
"eslint": "^8.51.0",
4949
"rimraf": "^5.0.5",
50-
"rollup": "^4.1.0",
50+
"rollup": "^4.1.4",
5151
"typescript": "^5.2.2",
5252
"vite": "^4.4.11",
5353
"vitest": "^0.34.6"

pnpm-lock.yaml

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"strict": true,
1111
"moduleResolution": "Node",
1212
"esModuleInterop": true,
13-
"types": ["node", "vitest/globals"]
13+
"types": ["vitest/globals"]
1414
},
1515
"files": [
1616
"./src/index.ts"

0 commit comments

Comments
 (0)