Skip to content

Commit 65da5dd

Browse files
authored
chapter: configure docs search (#25)
1 parent 482a0a0 commit 65da5dd

16 files changed

+2542
-889
lines changed

.eslintrc.cjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-env node */
2-
require('@rushstack/eslint-patch/modern-module-resolution')
2+
require('@rushstack/eslint-patch/modern-module-resolution');
33

44
module.exports = {
55
root: true,
6-
'extends': [
6+
extends: [
77
'plugin:vue/vue3-essential',
88
'eslint:recommended',
99
'@vue/eslint-config-typescript',
@@ -12,4 +12,4 @@ module.exports = {
1212
parserOptions: {
1313
ecmaVersion: 'latest'
1414
}
15-
}
15+
};

.prettierrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
"singleQuote": true,
66
"printWidth": 100,
77
"trailingComma": "none"
8-
}
8+
}

.vscode/extensions.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
{
2-
"recommendations": [
3-
"Vue.volar",
4-
"dbaeumer.vscode-eslint",
5-
"esbenp.prettier-vscode"
6-
]
2+
"recommendations": ["Vue.volar", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
73
}

index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8">
5-
<link rel="icon" href="/favicon.ico">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Vite App</title>
88
</head>
99
<body>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@
4545
"vitepress": "^1.0.2",
4646
"vue-tsc": "^2.0.6"
4747
}
48-
}
48+
}

packages/.vitepress/config.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ const Guide = [
1010
export default defineConfig({
1111
title: 'VueYous',
1212
description: 'Craft Your Own VueUse Composables From Scratch',
13-
head: [
14-
[
15-
'link',
16-
{ rel: 'icon', href: '/logo.png' }
17-
]
18-
],
13+
14+
head: [['link', { rel: 'icon', href: '/logo.png' }]],
15+
16+
// https://vitepress.dev/reference/default-theme-config
1917
themeConfig: {
18+
search: { provider: 'local' },
2019
logo: '/logo.png',
2120
// https://vitepress.dev/reference/default-theme-config
21+
2222
nav: [
2323
{ text: 'Home', link: '/' },
2424
{ text: 'Guide', items: Guide }

packages/core/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export { useManualRefHistory } from './useManualRefHistory';
2-
export { useRefHistory } from './useRefHistory';
2+
export { useRefHistory } from './useRefHistory';

packages/core/useManualRefHistory/demo.vue

+7-17
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,14 @@ const { canUndo, canRedo, history, commit, undo, redo } = useManualRefHistory(co
1717

1818
<template>
1919
<div>Count: {{ count }}</div>
20-
<button @click="inc()">
21-
Increment
22-
</button>
23-
<button @click="dec()">
24-
Decrement
25-
</button>
20+
<button @click="inc()">Increment</button>
21+
<button @click="dec()">Decrement</button>
2622
<span class="ml-2">/</span>
27-
<button @click="commit()">
28-
Commit
29-
</button>
30-
<button :disabled="!canUndo" @click="undo()">
31-
Undo
32-
</button>
33-
<button :disabled="!canRedo" @click="redo()">
34-
Redo
35-
</button>
36-
<br>
37-
<br>
23+
<button @click="commit()">Commit</button>
24+
<button :disabled="!canUndo" @click="undo()">Undo</button>
25+
<button :disabled="!canRedo" @click="redo()">Redo</button>
26+
<br />
27+
<br />
3828
<note>History (limited to 10 records for demo)</note>
3929
<div class="code-block mt-4">
4030
<div v-for="i in history" :key="i.timestamp">

packages/core/useManualRefHistory/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ category: State
33
related: useManualRefHistory
44
---
55

6-
# useManualRefHistory
6+
# useManualRefHistory

packages/core/useRefHistory/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { watchIgnorable } from '@vueyous/shared';
33

44
import { useManualRefHistory, type UseManualRefHistoryReturn } from '../useManualRefHistory';
55

6-
export interface UseRefHistoryReturn<Raw> extends UseManualRefHistoryReturn<Raw> { }
6+
export interface UseRefHistoryReturn<Raw> extends UseManualRefHistoryReturn<Raw> {}
77

88
export function useRefHistory<Raw>(source: Ref<Raw>) {
99
const { ignoreUpdates } = watchIgnorable(source, commit);

packages/guide/index.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# はじめに
22

3-
43
## 本書の目的
54

65
以下が本書の主な目的になります。
@@ -22,7 +21,6 @@
2221
- Vue.js を使ったことがある
2322
- Typescript を使ったことがある
2423

25-
2624
## 本書の構成
2725

28-
<!-- TODO: write about book structure -->
26+
<!-- TODO: write about book structure -->

packages/guide/setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# 環境構築
22

3-
<!-- TODO: write how to setup -->
3+
<!-- TODO: write how to setup -->

packages/guide/what-is-vueuse.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# VueUseとは
22

3-
<!-- TODO: write what is vueuse -->
3+
<!-- TODO: write what is vueuse -->

0 commit comments

Comments
 (0)