Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Feb 20, 2024
0 parents commit 6dca798
Show file tree
Hide file tree
Showing 125 changed files with 22,994 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
6 changes: 6 additions & 0 deletions .dumi/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { App } from 'antd';
import * as React from 'react';

export function rootContainer(container: React.ReactNode) {
return React.createElement(App, null, container);
}
20 changes: 20 additions & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from 'dumi';
import { homepage } from './package.json';

const isProd = process.env.NODE_ENV === 'production';
// 不是预览模式 同时是生产环境
const isProdSite = process.env.PREVIEW !== '1' && isProd;

const name = 'easy-antd-modal';

export default defineConfig({
themeConfig: {
name,
github: homepage,
},
base: isProdSite ? `/${name}/` : '/',
publicPath: isProdSite ? `/${name}/` : '/',
html2sketch: {},
mfsu: false,
outputPath: '.doc',
});
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
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/lambda/mock/**
/scripts
/config
/examples
_test_
__test__

/node_modules
jest*
/es
/lib
/docs
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@umijs/lint/dist/config/eslint');
7 changes: 7 additions & 0 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'father';

export default defineConfig({
cjs: { output: 'lib' },
esm: { output: 'es' },
umd: { output: 'dist', name: 'easyAntdModal' },
});
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: '报告Bug 🐛'
about: 报告 easy-antd-modal 的 bug
title: '[BUG]'
labels: 'BUG'
assignees: ''
---

### 🐛 bug 描述

<!--
详细地描述 bug,让大家都能理解
-->

### 📷 复现步骤

<!--
清晰描述复现步骤,让别人也能看到问题
-->

### 🏞 期望结果

<!--
描述你原本期望看到的结果
-->

### 💻 复现代码

<!--
提供可复现的代码,仓库,或线上示例
(可在下方 codesandbox 链接中添加你的最小可复现 demo)
-->

### © 版本信息

- easy-antd-modal 版本: [e.g. 1.0.0]
- 浏览器环境
- 开发环境 [e.g. mac OS]

### 🚑 其他信息

<!--
如截图等其他信息可以贴在这里
-->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: '功能需求 ✨'
about: 对 easy-antd-modal 的需求或建议
title: '[需求]'
labels: 'Feature'
assignees: ''
---

### 🥰 需求描述

<!--
详细地描述问题,让大家都能理解
-->

### 🧐 解决方案

<!--
如果你有解决方案,在这里清晰地阐述
-->

### 🚑 其他信息

<!--
如截图等其他信息可以贴在这里
-->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: '疑问或需要帮助 ❓'
about: 对 easy-antd-modal 使用的疑问或需要帮助
title: '[问题]'
labels: 'Question'
assignees: ''
---

### 🧐 问题描述

<!--
详细地描述问题,让大家都能理解
-->

### 💻 示例代码

<!--
如果有必要,展示代码,线上示例,或仓库
-->

### 🚑 其他信息

<!--
如截图等其他信息可以贴在这里
-->
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#### 💻 变更类型 | Change Type

<!-- For change type, change [ ] to [x]. -->

- \[ ] feat
- \[ ] fix
- \[ ] style
- \[ ] chore
- \[ ] docs

#### 🔀 变更说明 | Description of Change

<!-- Thank you for your Pull Request. Please provide a description above. -->

#### 📝 补充信息 | Additional Information

<!-- Add any other context about the Pull Request here. -->
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release CI
on:
push:
branches:
- master
- beta

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install deps
run: pnpm install

- name: Test
run: pnpm run test

release:
needs: test
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install deps
run: pnpm install

- name: release
run: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
61 changes: 61 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ['master']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install deps
run: pnpm install

- name: Build Pages
run: pnpm run docs:build

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: '.doc'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install deps
run: pnpm install

- name: lint
run: pnpm run ci

- name: Test and coverage
run: pnpm run test:coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
46 changes: 46 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
**/node_modules
# roadhog-api-doc ignore
/src/utils/request-temp.js
_roadhog-api-doc

# production
**/dist
/.vscode
/es
/lib

# misc
.DS_Store
storybook-static
npm-debug.log*
yarn-error.log

/coverage
.idea
package-lock.json
*bak
.vscode

# visual studio code
.history
*.log
functions/*
lambda/mock/index.js
.temp/**

# umi
.dumi/tmp*
.doc

# screenshot
screenshot
.firebase
example/.temp/*
.eslintcache
techUI*

# Symbolic link
examples/with-antd4/src/App.tsx
Loading

0 comments on commit 6dca798

Please sign in to comment.