Skip to content

Commit

Permalink
chapter: configure docs search (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubugeeei authored Apr 13, 2024
1 parent 482a0a0 commit 65da5dd
Show file tree
Hide file tree
Showing 16 changed files with 2,542 additions and 889 deletions.
6 changes: 3 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = {
root: true,
'extends': [
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
Expand All @@ -12,4 +12,4 @@ module.exports = {
parserOptions: {
ecmaVersion: 'latest'
}
}
};
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
}
6 changes: 1 addition & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"Vue.volar",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
"recommendations": ["Vue.volar", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
"vitepress": "^1.0.2",
"vue-tsc": "^2.0.6"
}
}
}
12 changes: 6 additions & 6 deletions packages/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ const Guide = [
export default defineConfig({
title: 'VueYous',
description: 'Craft Your Own VueUse Composables From Scratch',
head: [
[
'link',
{ rel: 'icon', href: '/logo.png' }
]
],

head: [['link', { rel: 'icon', href: '/logo.png' }]],

// https://vitepress.dev/reference/default-theme-config
themeConfig: {
search: { provider: 'local' },
logo: '/logo.png',
// https://vitepress.dev/reference/default-theme-config

nav: [
{ text: 'Home', link: '/' },
{ text: 'Guide', items: Guide }
Expand Down
2 changes: 1 addition & 1 deletion packages/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { useManualRefHistory } from './useManualRefHistory';
export { useRefHistory } from './useRefHistory';
export { useRefHistory } from './useRefHistory';
24 changes: 7 additions & 17 deletions packages/core/useManualRefHistory/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,14 @@ const { canUndo, canRedo, history, commit, undo, redo } = useManualRefHistory(co

<template>
<div>Count: {{ count }}</div>
<button @click="inc()">
Increment
</button>
<button @click="dec()">
Decrement
</button>
<button @click="inc()">Increment</button>
<button @click="dec()">Decrement</button>
<span class="ml-2">/</span>
<button @click="commit()">
Commit
</button>
<button :disabled="!canUndo" @click="undo()">
Undo
</button>
<button :disabled="!canRedo" @click="redo()">
Redo
</button>
<br>
<br>
<button @click="commit()">Commit</button>
<button :disabled="!canUndo" @click="undo()">Undo</button>
<button :disabled="!canRedo" @click="redo()">Redo</button>
<br />
<br />
<note>History (limited to 10 records for demo)</note>
<div class="code-block mt-4">
<div v-for="i in history" :key="i.timestamp">
Expand Down
2 changes: 1 addition & 1 deletion packages/core/useManualRefHistory/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ category: State
related: useManualRefHistory
---

# useManualRefHistory
# useManualRefHistory
2 changes: 1 addition & 1 deletion packages/core/useRefHistory/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { watchIgnorable } from '@vueyous/shared';

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

export interface UseRefHistoryReturn<Raw> extends UseManualRefHistoryReturn<Raw> { }
export interface UseRefHistoryReturn<Raw> extends UseManualRefHistoryReturn<Raw> {}

export function useRefHistory<Raw>(source: Ref<Raw>) {
const { ignoreUpdates } = watchIgnorable(source, commit);
Expand Down
4 changes: 1 addition & 3 deletions packages/guide/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# はじめに


## 本書の目的

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


## 本書の構成

<!-- TODO: write about book structure -->
<!-- TODO: write about book structure -->
2 changes: 1 addition & 1 deletion packages/guide/setup.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# 環境構築

<!-- TODO: write how to setup -->
<!-- TODO: write how to setup -->
2 changes: 1 addition & 1 deletion packages/guide/what-is-vueuse.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# VueUseとは

<!-- TODO: write what is vueuse -->
<!-- TODO: write what is vueuse -->
Loading

0 comments on commit 65da5dd

Please sign in to comment.