Skip to content

Commit

Permalink
perf: init template
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkffgg committed Dec 25, 2020
1 parent fcbf91a commit fac593f
Show file tree
Hide file tree
Showing 18 changed files with 604 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
4 changes: 4 additions & 0 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
esm: 'rollup',
cjs: 'rollup',
};
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/npm-debug.log*
/yarn-error.log
/yarn.lock
/package-lock.json

# production
/dist
/docs-dist

# misc
.DS_Store

# umi
.umi
.umi-production
.umi-test
.env.local
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/*.svg
**/*.ejs
**/*.html
package.json
.umi
.umi-production
.umi-test
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"overrides": [
{
"files": ".prettierrc",
"options": { "parser": "json" }
}
]
}
26 changes: 26 additions & 0 deletions .umirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defineConfig } from 'dumi';

const repo = 'dumi-template';

export default defineConfig({
title: repo,
favicon:
'https://user-images.githubusercontent.com/9554297/83762004-a0761b00-a6a9-11ea-83b4-9c8ff721d4b8.png',
logo:
'https://user-images.githubusercontent.com/9554297/83762004-a0761b00-a6a9-11ea-83b4-9c8ff721d4b8.png',
outputPath: 'docs-dist',
mode: 'site',
hash: true,
exportStatic: {},
// Because of using GitHub Pages
base: `/${repo}/`,
publicPath: `/${repo}/`,
navs: [
null,
{
title: 'GitHub',
path: 'https://github.com/umijs/dumi-template',
},
],
// more config: https://d.umijs.org/config
});
155 changes: 155 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# 📖 Dumi Template

A Umi-based doc template can assist you to develop libraries & write docs.

English | [简体中文](./README.zh-CN.md)

## 🚀 How to use?

![](./use.png)

## ✨ Online preview

https://umijs.github.io/dumi-template/

## 📒 Catalog Introduction

```
├── docs Component documentation
│ ├── index.md Home page
│ └── **.** Site Directory Document
├── src Component home directory
│ ├── index.ts Component registration
│ └── Foo Component development
├── .eslintrc.js eslint config
├── .fatherrc.ts father config
├── .umirc.ts dumi config
└── tsconfig.json typescript config
```

The rest of the documents can be consulted by yourself.

## 🤖 Command introduction

| Name | Description | Remarks |
| ----------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `npm run start` | Project begining | Document usage [dumi](https://github.com/umijs/dumi), component development and documentation development together |
| `npm run test` | Component test | - |
| `npm run test:coverage` | Code coverage review | - |
| `npm run prettier` | Code prettier | - |
| `npm run build` | Component packaging | Use [father](https://github.com/umijs/father) |
| `npm run release` | Component package release | - |
| `npm run docs:build` | Document packaging | - |
| `npm run docs:deploy` | Document release | The default is to use GitHub Pages |
| `npm run deploy` | Document package release | - |

## Who are using dumi?

<table>
<tbody>
<tr>
<td align="center">
<a target="_blank" href="https://umijs.org">
<img
width="32"
src="https://gw.alipayobjects.com/zos/bmw-prod/598d14af-4f1c-497d-b579-5ac42cd4dd1f/k7bjua9c_w132_h130.png"
/>
<br>
<strong>UmiJS</strong>
</a>
</td>
<td align="center">
<a target="_blank" href="https://ahooks.js.org/">
<img
height="32"
style="vertical-align: -0.32em; margin-right: 8px;"
src="https://ahooks.js.org/logo.svg"
/>
<br>
<strong>ahooks</strong>
</a>
</td>
<td align="center">
<a target="_blank" href="https://procomponents.ant.design/">
<img
width="32"
style="vertical-align: -0.32em; margin-right: 8px;"
src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"
/>
<br>
<strong>Pro Components</strong>
</a>
</td>
<td align="center">
<a target="_blank" href="https://github.com/react-component">
<img
width="32"
style="vertical-align: -0.32em; margin-right: 8px;"
src="https://avatars3.githubusercontent.com/u/9441414?s=200&v=4"
/>
<br>
<strong>react-component</strong>
</a>
</td>
<td align="center">
<a target="_blank" href="https://ggeditor.com">
<img
width="32"
style="vertical-align: -0.32em; margin-right: 8px;"
src="https://img.alicdn.com/tfs/TB1FFA1CFP7gK0jSZFjXXc5aXXa-214-200.png"
/>
<br>
<strong>GGEditor</strong>
</a>
</td>
<td align="center">
<a target="_blank" href="https://remaxjs.org">
<img
width="32"
style="vertical-align: -0.32em; margin-right: 8px;"
src="https://gw.alipayobjects.com/mdn/rms_b5fcc5/afts/img/A*1NHAQYduQiQAAAAAAAAAAABkARQnAQ"
/>
<br>
<strong>Remax</strong>
</a>
</td>
<td align="center">
<a target="_blank" href="https://lightproxy.org">
<img
width="32"
style="vertical-align: -0.32em; margin-right: 8px;"
src="https://user-images.githubusercontent.com/5436704/81533849-83e00f00-9399-11ea-943d-ac5fd4653906.png"
/>
<br>
<strong>LightProxy</strong>
</a>
</td>
<td align="center">
<a target="_blank" href="https://juejin-im.github.io/open-source/">
<img
width="32"
style="vertical-align: -0.32em; margin-right: 8px;"
src="https://avatars3.githubusercontent.com/u/69633008?s=200&v=4"
/>
<br>
<strong>juejin-im</strong>
</a>
</td>
</tr>
</tbody>
</table>

### README Badge

Using dumi ? Add a README badge to show it off: [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue)](https://github.com/umijs/dumi)

```
[![dumi](https://img.shields.io/badge/docs%20by-dumi-blue)](https://github.com/umijs/dumi)
```

## Discuss group

<div>
<img src="https://gw.alipayobjects.com/zos/bmw-prod/881c4596-a6cc-4f69-be8d-f94c4e02e058/k7ttshpq_w1004_h1346.jpeg" width="300" />
<img src="https://gw.alipayobjects.com/zos/bmw-prod/c18bc2a5-719a-48ca-b225-c79ef88bfb43/k7m10ymd_w1004_h1346.jpeg" width="300" />
</div>
Loading

0 comments on commit fac593f

Please sign in to comment.