Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
wanpan11 committed Jul 5, 2024
1 parent dc1fe60 commit d12126e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export default defineConfig({
alias: {
'joystick-kit': path.join(__dirname, 'src'),
},
publicPath: process.env.NODE_ENV === 'production' ? '/joystick/' : '',
base: process.env.NODE_ENV === 'production' ? '/joystick/' : '',
publicPath: process.env.NODE_ENV === 'production' ? '/joystick/' : '/',
base: process.env.NODE_ENV === 'production' ? '/joystick/' : '/',
});
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
[![NPM downloads](http://img.shields.io/npm/dm/joystick-kit.svg?style=flat)](https://npmjs.org/package/joystick-kit)

Virtual joystick | 虚拟摇杆 游戏手柄

[docs](https://wanpan11.github.io/joystick/)

![image](https://github.com/wanpan11/joystick/assets/38714194/3d97d001-b19f-4a71-b5f1-1053106592fa)
6 changes: 4 additions & 2 deletions docs/demo/customization.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Joystick from 'joystick-kit';
import React, { useEffect } from 'react';
import back from '../../public/img/joystick_back.png';
import front from '../../public/img/joystick_frontPressed.png';

export default function Demo() {
useEffect(() => {
Expand All @@ -10,8 +12,8 @@ export default function Demo() {
size: 120,
position: { top: 'calc(50% - 60px)', left: 'calc(50% - 60px)' },
backImg: {
back: '/img/joystick_back.png',
front: '/img/joystick_frontPressed.png',
back: back,
front: front,
},
});

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"joystick-kit/*": ["src/*", "*"]
}
},
"include": [".dumirc.ts", "src/**/*", "docs/**/*"]
"include": [".dumirc.ts", "src/**/*", "docs/**/*", "./index.d.ts"]
}

0 comments on commit d12126e

Please sign in to comment.