Skip to content

Commit

Permalink
Merge branch 'v4' into feat_useProState2
Browse files Browse the repository at this point in the history
  • Loading branch information
coding-ice committed Apr 21, 2024
2 parents 7ab0d31 + 1eb16eb commit 2c2afab
Show file tree
Hide file tree
Showing 1,207 changed files with 27,020 additions and 7,943 deletions.
12 changes: 12 additions & 0 deletions .dumi/pages/index.en-US.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* sidebar: false
*/

import React from 'react';
import { HomeBaseLayout } from '@ahooks.js/dumi-theme-antd';

const Index = () => {
return <HomeBaseLayout></HomeBaseLayout>;
};

export default Index;
12 changes: 12 additions & 0 deletions .dumi/pages/index.zh-CN.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* sidebar: false
*/

import React from 'react';
import { HomeBaseLayout } from '@ahooks.js/dumi-theme-antd';

const Index = () => {
return <HomeBaseLayout></HomeBaseLayout>;
};

export default Index;
4 changes: 4 additions & 0 deletions .dumi/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": ["**/*"]
}
132 changes: 132 additions & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
import { defineConfig } from 'dumi';

const packages = require('./packages/hooks/package.json');

export default defineConfig({
mfsu: false,
ssr: false,
manifest: {},
alias: {
ahooks: process.cwd() + '/packages/hooks/src/index.ts',
'@ahooksjs/use-url-state': process.cwd() + '/packages/use-url-state/src/index.ts',
},
resolve: {
docDirs: ['docs'],
atomDirs: [
{ type: 'hook', dir: 'packages/hooks/src' },
{ type: 'hook', dir: 'packages/hooks/src/useRequest/docs' },
{ type: 'hook', dir: 'packages/use-url-state' },
],
},
sitemap: {
hostname: 'https://ahooks.js.org/',
},
favicons: ['/simple-logo.svg'],
locales: [
{ id: 'en-US', name: 'English' },
{ id: 'zh-CN', name: '中文' },
],
themeConfig: {
logo: '/logo.svg',
title: 'ahooks',
bannerConfig: {
showBanner: false,
},
description: {
'en-US': 'A high-quality & reliable React Hooks library',
'zh-CN': '一套高质量可靠的 React Hooks 库',
},
actions: {
'en-US': [
{ text: 'Getting Started', link: '/guide', type: 'primary' },
{ text: 'Hooks List', link: '/hooks/index' },
],
'zh-CN': [
{ text: '开始使用', link: '/zh-CN/guide', type: 'primary' },
{ text: 'Hooks 列表', link: '/zh-CN/hooks/index' },
],
},
features: {
'en-US': [
{ title: 'Easy to learn and use' },
{ title: 'Supports SSR' },
{ title: 'Special treatment for functions, avoid closure problems' },
{
title:
'Contains a large number of advanced Hooks that are refined from business scenarios',
},
{ title: 'Contains a comprehensive collection of basic Hooks' },
{ title: 'Written in TypeScript with predictable static types' },
],
'zh-CN': [
{ title: '易学易用' },
{ title: '支持 SSR' },
{ title: '对输入输出函数做了特殊处理,避免闭包问题' },
{ title: '包含大量提炼自业务的高级 Hooks' },
{ title: '包含丰富的基础 Hooks' },
{ title: '使用 TypeScript 构建,提供完整的类型定义文件' },
],
},
rtl: true,
socialLinks: {
github: 'https://github.com/alibaba/hooks',
},
docVersions: {
[packages.version]: '',
'v2.x': 'https://ahooks-v2.js.org/',
'v1.x': 'http://hooks.umijs.org/',
},
localesEnhance: [
{ id: 'en-US', switchPrefix: 'En' },
{ id: 'zh-CN', switchPrefix: '中' },
],
sidebarGroupModePath: ['/guide', '/hooks', '/blog'],
nav: {
'en-US': [
{ title: 'Guide', link: '/guide' },
{ title: 'Hooks', link: '/hooks/index' },
{ title: 'Blog', link: '/blog/function' },
{ title: 'Releases', link: 'https://github.com/alibaba/hooks/releases' },
{ title: 'Mirror', link: 'https://ahooks.gitee.io' },
],
'zh-CN': [
{ title: '指南', link: '/zh-CN/guide' },
{ title: 'Hooks', link: '/zh-CN/hooks/index' },
{ title: '博客', link: '/zh-CN/blog/function' },
{ title: '更新日志', link: 'https://github.com/alibaba/hooks/releases' },
{ title: '国内镜像', link: 'https://ahooks.gitee.io/zh-CN' },
],
},
footer:
'Open-source MIT Licensed | Copyright © 2019-present<br />Powered by <a href="https://d.umijs.org" target="_blank">dumi</a>',
},
links: [
// Used by the `useFusionTable` demo
{
rel: 'stylesheet',
href: 'https://unpkg.com/@alifd/theme-design-pro@0.6.2/dist/next-noreset.min.css',
},
{ rel: 'stylesheet', href: '/style.css' },
],
extraBabelPlugins: [
[
'babel-plugin-import',
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
},
'antd',
],
[
'babel-plugin-import',
{
libraryName: '@alifd/next',
style: false,
},
'fusion',
],
],
// https://github.com/alibaba/hooks/issues/2155
extraBabelIncludes: ['filter-obj'],
});
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ module.exports = {
'@typescript-eslint/no-parameter-properties': 'off',
'import/no-useless-path-segments': 'off',
'no-unused-expressions': 'off',
'react/no-array-index-key': 'off',
'react/no-unescaped-entities': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'off',
'no-await-in-loop': 'off',
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ node_modules
coverage
.doc
.DS_Store
.umi
.umi-production
.dumi/tmp
.dumi/tmp-test
.dumi/tmp-production
page
lerna-debug.log
tsconfig.tsbuildinfo
Expand Down
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
{
"files": ["*.md"],
"options": {
"embeddedLanguageFormatting": "off"
"embeddedLanguageFormatting": "off",
"proseWrap": "preserve"
}
}
]
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 2c2afab

Please sign in to comment.