Skip to content

Commit a5f2463

Browse files
committed
chore: update automd setup
1 parent 1e629eb commit a5f2463

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<!-- automd:badges -->
44

5-
[![npm version](https://flat.badgen.net/npm/v/nitropack)](https://npmjs.com/package/nitropack)
6-
[![npm downloads](https://flat.badgen.net/npm/dm/nitropack)](https://npmjs.com/package/nitropack)
5+
[![npm version](https://img.shields.io/npm/v/nitropack)](https://npmjs.com/package/nitropack)
6+
[![npm downloads](https://img.shields.io/npm/dm/nitropack)](https://npm.chart.dev/nitropack)
77

88
<!-- /automd -->
99

automd.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
input: ["README.md", "docs/**/*.md"],
3+
generators: {},
4+
};

docs/.config/automd.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from "../../automd.config";

docs/1.guide/3.websocket.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Create a websocket handler in `server/routes/_ws.ts`.
4646
> [!TIP]
4747
> You can use any route like `server/routes/chatroom.ts` to register upgrade handler on `/chatroom`.
4848
49-
<!-- automd:file code src="../../examples/websocket/routes/_ws.ts" -->
49+
<!-- automd-disabled:file code src="../../examples/websocket/routes/_ws.ts" -->
5050

5151
```ts [server/routes/_ws.ts]
5252
export default defineWebSocketHandler({
@@ -79,7 +79,7 @@ export default defineWebSocketHandler({
7979
8080
Use a client to connect to server. Example: (`server/routes/websocket.ts`)
8181

82-
<!-- automd:file code src="../../examples/websocket/routes/index.ts" -->
82+
<!-- automd-disabled:file code src="../../examples/websocket/routes/index.ts" -->
8383

8484
```ts [index.ts]
8585
export default defineEventHandler(() => {

docs/1.guide/5.database.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export default defineEventHandler(async () => {
6767
rows,
6868
};
6969
});
70-
7170
```
7271

7372
<!-- /automd -->

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"gen-node-compat": "pnpm node-ts scripts/gen-node-compat.ts",
8585
"gen-presets": "pnpm jiti scripts/gen-presets.ts",
8686
"lint": "eslint --cache . && prettier -c .",
87-
"lint:fix": "eslint --cache --fix . && prettier -w .",
87+
"lint:fix": "automd && eslint --cache --fix . && prettier -w .",
8888
"nitro": "jiti ./src/cli/index.ts",
8989
"node-ts": "node --disable-warning=ExperimentalWarning --experimental-strip-types",
9090
"prepack": "pnpm build",

0 commit comments

Comments
 (0)