Skip to content

Commit ab18fa8

Browse files
authored
Merge pull request #28 from worldzhao/chore/update-deps
chore: update dumi version and lint tools version
2 parents 4f4d462 + a2ace10 commit ab18fa8

File tree

17 files changed

+10089
-5198
lines changed

17 files changed

+10089
-5198
lines changed

.dumirc.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { defineConfig } from 'dumi';
2+
import path from 'path';
3+
4+
let base: string | undefined;
5+
let publicPath: string | undefined;
6+
7+
// Github Pages 部署时需要更换为自己的仓库名
8+
if (process.env.NODE_ENV === 'production' && process.env.PREVIEW !== '1') {
9+
base = '/react-ui-library-tutorial';
10+
publicPath = '/react-ui-library-tutorial/';
11+
}
12+
13+
export default defineConfig({
14+
base,
15+
publicPath,
16+
title: 'Happy UI',
17+
outputPath: 'doc-site',
18+
resolve: {
19+
docDirs: ['docs'],
20+
atomDirs: [{ type: 'component', dir: 'src' }],
21+
},
22+
exportStatic: {},
23+
forkTSChecker: {},
24+
extraBabelPlugins: [
25+
[
26+
'import',
27+
{
28+
libraryName: '@zzzzw/happy-ui',
29+
libraryDirectory: '',
30+
customStyleName: (name) => path.resolve(__dirname, `src/${name}/style/index.ts`),
31+
},
32+
],
33+
],
34+
});

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
template/
22
*.js
3-
**/demo/
43
**/__tests__/
4+
scripts/

.github/workflows/gh-pages.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ jobs:
1010
runs-on: ubuntu-18.04
1111
steps:
1212
- uses: actions/checkout@v2
13-
- run: yarn
14-
- run: yarn build:site
13+
- run: npm i pnpm -g
14+
- run: pnpm install
15+
- run: pnpm build:site
1516
- name: Deploy
1617
uses: peaceiris/actions-gh-pages@v3
1718
with:

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919
/doc-site
2020
/types
2121

22-
# umi
22+
# dumi
23+
.dumi/tmp
24+
.dumi/tmp-test
25+
.dumi/tmp-production
2326
.umi
2427
.umi-production
2528
.env.local
2629

27-
2830
# misc
2931
.DS_Store
3032
.env.local

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.prettierrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,12 @@ const fabric = require('@umijs/fabric');
22

33
module.exports = {
44
...fabric.prettier,
5+
plugins: [
6+
require.resolve('prettier-plugin-packagejson'),
7+
require.resolve('@trivago/prettier-plugin-sort-imports'),
8+
],
9+
importOrder: ['^react', '<THIRD_PARTY_MODULES>', '^@.*', '^./(.*)', '^../(.*)'],
10+
importOrderSeparation: true,
11+
importOrderSortSpecifiers: true,
12+
importOrderCaseInsensitive: true,
513
};

.stylelintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
module.exports = {
22
extends: [require.resolve('@umijs/fabric/dist/stylelint')],
3+
rules: {},
34
};

.umirc.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/help.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)