-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
120 changed files
with
24,723 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# javascripts | ||
lib/ | ||
scripts/ | ||
|
||
# tests | ||
test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"extends": ["plugin:@typescript-eslint/recommended"], | ||
"rules": { | ||
"@typescript-eslint/member-delimiter-style": 0, | ||
"@typescript-eslint/no-explicit-any": 0, | ||
"@typescript-eslint/no-empty-function": 0, | ||
"@typescript-eslint/no-this-alias": 0, | ||
"@typescript-eslint/ban-ts-ignore": 0, | ||
"@typescript-eslint/ban-ts-comment": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: '🐛 Bug Report' | ||
about: Report a reproducible bug or regression. | ||
title: 'Bug: ' | ||
labels: 'bug' | ||
--- | ||
|
||
## Bug Report | ||
|
||
<!-- | ||
Please provide a clear and concise description of what the bug is. Include | ||
screenshots if needed. Please test using the latest version of the relevant | ||
dox-test packages to make sure your issue has not already been fixed. | ||
--> | ||
|
||
## Steps To Reproduce | ||
|
||
1. | ||
2. | ||
|
||
<!-- | ||
Your bug will get fixed much faster if we can run your code and it doesn't | ||
have dependencies other than dox-test. Issues without reproduction steps or | ||
code examples may be immediately closed as not actionable. | ||
--> | ||
|
||
Link to code example: | ||
|
||
<!-- | ||
Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a | ||
repository on GitHub, or provide a minimal code example that reproduces the | ||
problem. You may provide a screenshot of the application if you think it is | ||
relevant to your bug report. Here are some tips for providing a minimal | ||
example: https://stackoverflow.com/help/mcve. | ||
--> | ||
|
||
## Current behavior | ||
|
||
## Expected behavior | ||
|
||
## Environment | ||
|
||
- Browser: [e.g. chrome, safari] | ||
- Version: [e.g. v1.0.0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: '🚀 Feature Request' | ||
about: Suggest an idea for dox-test | ||
title: 'Feature: ' | ||
labels: 'enhancement' | ||
--- | ||
|
||
### Problem Description | ||
|
||
<!-- Is your feature request related to a problem? Please add a clear and concise description of what the problem is. --> | ||
|
||
### Proposed Solution | ||
|
||
<!-- Describe the solution you'd like in a clear and concise manner --> | ||
|
||
### Alternatives Considered | ||
|
||
<!-- A clear and concise description of any alternative solutions or features you've considered. --> | ||
|
||
### Additional Information | ||
|
||
<!-- Add any other context about the problem here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# systems | ||
.DS_Store | ||
.idea/ | ||
|
||
# temps | ||
*.log | ||
*.cache | ||
*.diff | ||
*.patch | ||
*.tmp | ||
|
||
# coverages | ||
coverage/ | ||
*.lcov | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# customers | ||
cjs/ | ||
esm/ | ||
umd/ | ||
lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package | ||
|
||
# tests | ||
test/ | ||
coverage/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# linters | ||
.eslintrc | ||
.eslintignore | ||
|
||
# settings | ||
.editorconfig | ||
.prettierrc | ||
.npmrc | ||
tsconfig.json | ||
|
||
# systems | ||
.DS_Store | ||
.idea/ | ||
*.log.com | ||
.vscode/ | ||
|
||
# customers | ||
src/ | ||
scripts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
registry="https://registry.npmjs.org/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"semi": false, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"arrowParens": "avoid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
language: node_js | ||
node_js: | ||
- '12' | ||
cache: npm | ||
env: | ||
- CI=true | ||
script: | ||
- npm run test:once | ||
- npm run docs:build | ||
after_success: | ||
- npm run coverage | ||
deploy: | ||
provider: pages | ||
skip_cleanup: true | ||
github_token: $github_token | ||
local_dir: docs/.vuepress/dist/ | ||
on: | ||
branch: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Current File", | ||
"program": "${workspaceRoot}/node_modules/ts-node/dist/bin.js", | ||
"args": ["--files", "${file}"], | ||
"cwd": "${workspaceRoot}", | ||
"protocol": "inspector", | ||
"console": "integratedTerminal" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Jest Current File", | ||
"program": "${workspaceFolder}/node_modules/.bin/jest", | ||
"args": ["${fileBasenameNoExtension}", "--config", "jest.config.js"], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"disableOptimisticBPs": true, | ||
"windows": { | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<p align="center"><a href="https://github.com/kwai-test/dox/" target="_blank" rel="noopener noreferrer"><img width="200" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1604638209660&di=e8df94ce63ec253f7b3cfaa849e05452&imgtype=0&src=http%3A%2F%2Fphoto.16pic.com%2F00%2F13%2F82%2F16pic_1382167_b.jpg" alt="Dox logo"></a></p> | ||
|
||
<h1 align="center">Dox</h1> | ||
|
||
<p align="center"> | ||
this is the description of dox | ||
<br><br> | ||
<a href="https://travis-ci.com/kwai-test/dox"><img src="https://travis-ci.com/kwai-test/dox.svg?branch=main" alt="Build Status"></a> | ||
<a href="https://codecov.io/gh/kwai-test/dox"><img src="https://codecov.io/gh/kwai-test/dox/branch/main/graph/badge.svg" alt="Coverage Status"></a> | ||
<a href="https://www.npmjs.com/package/dox-test"><img src="https://img.shields.io/npm/v/dox-test" alt="Version"></a> | ||
<a href="https://www.npmjs.com/package/dox-test"><img src="https://img.shields.io/npm/dm/dox-test" alt="Downloads"></a> | ||
<a href="https://img.shields.io/bundlephobia/minzip/dox-test"><img src="https://img.shields.io/bundlephobia/minzip/dox-test" alt="Bundle Size"></a> | ||
<a href="https://github.com/kwai-test/dox/"><img src="https://img.shields.io/snyk/vulnerabilities/npm/dox-test" alt="Vulnerabilities"></a> | ||
<br> | ||
<img src="https://img.shields.io/npm/dependency-version/dox-test/peer/react" alt="Peer React"> | ||
<img src="https://img.shields.io/npm/dependency-version/dox-test/peer/react-dom" alt="Peer React Dom"> | ||
</p> | ||
|
||
## ✨ 特性 | ||
|
||
- **简单易用** | ||
- **TypeScript 支持** | ||
|
||
## 📦 安装 | ||
|
||
```bash | ||
$ npm i dox-test -S | ||
``` | ||
|
||
```bash | ||
$ yarn add dox-test | ||
``` | ||
|
||
## 🔨 快速开始 | ||
|
||
## 🔗 示例 | ||
|
||
## 🖥 版本依赖 | ||
|
||
- React >= 16.8.0 | ||
- ReactDOM >= 16.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'type-enum': [ | ||
2, | ||
'always', | ||
[ | ||
'build', | ||
'release', | ||
'chore', | ||
'ci', | ||
'docs', | ||
'feat', | ||
'fix', | ||
'perf', | ||
'refactor', | ||
'revert', | ||
'style', | ||
'test', | ||
], | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
module.exports = { | ||
// https://vuepress.vuejs.org/zh/guide/deploy.html#github-pages | ||
base: '/dox/', | ||
title: 'Dobux', | ||
description: '基于 React Context 和 React Hooks 的轻量级数据流管理方案', | ||
extraWatchFiles: ['.vuepress/nav-config.js'], | ||
head: [ | ||
['meta', { name: 'theme-color', content: '#61dafb' }], | ||
[ | ||
'link', | ||
{ | ||
rel: 'icon', | ||
href: '/dobux.ico', | ||
}, | ||
], | ||
], | ||
locales: { | ||
'/': { | ||
lang: 'zh-CN', | ||
}, | ||
}, | ||
themeConfig: { | ||
nav: require('./nav-config'), | ||
sidebar: 'auto', | ||
search: true, | ||
searchMaxSuggestions: 10, | ||
// string | boolean | ||
lastUpdated: 'Last Updated', | ||
|
||
// 假定是 GitHub. 同时也可以是一个完整的 GitLab URL | ||
// repo: 'http://git.corp.xxx.com/ks-ad/ad-fe/dobux', | ||
// 自定义仓库链接文字。默认从 `themeConfig.repo` 中自动推断为 | ||
// "GitHub"/"GitLab"/"Bitbucket" 其中之一,或是 "Source"。 | ||
repoLabel: 'GitLab', | ||
|
||
// 以下为可选的编辑链接选项 | ||
// 假如你的文档仓库和项目本身不在一个仓库: | ||
// docsRepo: 'http://git.corp.xxx.com/ks-ad/ad-fe/dobux', | ||
// 假如文档不是放在仓库的根目录下: | ||
docsDir: 'docs', | ||
// 假如文档放在一个特定的分支下: | ||
docsBranch: 'master', | ||
// 默认是 false, 设置为 true 来启用 | ||
editLinks: true, | ||
// 默认为 "Edit this page" | ||
editLinkText: '帮助我们改善此页面!', | ||
|
||
locales: { | ||
'/': { | ||
sidebar: { | ||
'/guide/': getGuideSidebar('指南', '社区方案对比'), | ||
'/api/': [''], | ||
// '/changelog/': getChangelogSidebar('CHANGELOG'), | ||
}, | ||
}, | ||
}, | ||
}, | ||
evergreen: true, | ||
} | ||
|
||
function getGuideSidebar(groupA, groupB) { | ||
return [ | ||
{ | ||
title: groupA, | ||
collapsable: false, | ||
sidebarDepth: 2, | ||
children: [ | ||
'', | ||
'getting-started', | ||
'best-practice', | ||
'example', | ||
'redux-dev-tools', | ||
'eslint', | ||
'faq', | ||
], | ||
}, | ||
// { | ||
// title: groupB, | ||
// collapsable: false, | ||
// children: ['dobux', 'redux', 'dva'], | ||
// }, | ||
] | ||
} | ||
|
||
function getApiSidebar(groupA, groupB) { | ||
return { | ||
title: groupA, | ||
collapsable: false, | ||
sidebarDepth: 2, | ||
} | ||
} | ||
|
||
function getChangelogSidebar(groupA) { | ||
return [ | ||
{ | ||
title: groupA, | ||
collapsable: false, | ||
sidebarDepth: 0, | ||
children: ['store', 'hooks'], | ||
}, | ||
] | ||
} |
Oops, something went wrong.