Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x #152

Merged
merged 6 commits into from
Jul 21, 2021
Merged

2.x #152

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const base = require('@umijs/fabric/dist/eslint');

module.exports = {
...base,
rules: {
...base.rules,
'import/no-extraneous-dependencies': 0,
'import/no-named-as-default': 0,
'no-template-curly-in-string': 0,
'prefer-promise-reject-errors': 0,
'react/no-array-index-key': 0,
'react/require-default-props': 0,
'react/sort-comp': 0,
'react/no-find-dom-node': 1,
'@typescript-eslint/no-explicit-any': 0,
'jsx-a11y/label-has-associated-control': 0,
'jsx-a11y/label-has-for': 0,
'no-param-reassign': 0
},
};
10 changes: 10 additions & 0 deletions .fatherrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

export default {
cjs: 'babel',
esm: { type: 'babel', importLibToEs: true },
runtimeHelpers: true,
preCommit: {
eslint: true,
prettier: true,
},
};
113 changes: 113 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: CI

on:
push:
branches: [master, 2.x]
pull_request:
branches: [master]

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- uses: actions/setup-node@v1
with:
node-version: '12'

- name: cache package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only

- name: hack for singe file
run: |
if [ ! -d "package-temp-dir" ]; then
mkdir package-temp-dir
fi
cp package-lock.json package-temp-dir
- name: cache node_modules
id: node_modules_cache_id
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: install
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: npm ci

lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: lint
run: npm run lint

needs: setup

compile:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: compile
run: npm run compile

needs: setup

coverage:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: coverage
run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash)

needs: setup
30 changes: 24 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.storybook
*.iml
*.log
.idea
.idea/
.ipr
.iws
*~
Expand All @@ -12,17 +13,34 @@
Thumbs.db
.project
.*proj
.svn
.svn/
*.swp
*.swo
*.pyc
*.pyo
.build
node_modules
.cache
*.css
dist
assets/**/*.css
build
lib
coverage
dist
es
*.lock
coverage
yarn.lock
package-lock.json
.vscode
.doc
# production
/dist
/docs-dist

# misc
.DS_Store
# umi
.umi
.umi-production
.umi-test
.env.local
src/.umi
QueueAnim_1.jsx
1 change: 0 additions & 1 deletion .jshintignore

This file was deleted.

10 changes: 0 additions & 10 deletions .jshintrc

This file was deleted.

29 changes: 29 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
build/
*.cfg
nohup.out
*.iml
.idea/
.ipr
.iws
*~
~*
*.diff
*.log
*.patch
*.bak
.DS_Store
Thumbs.db
.project
.*proj
.svn/
*.swp
out/
.build
node_modules
.cache
examples
tests
src
/index.js
.*
assets/**/*.less
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
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .umirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// more config: https://d.umijs.org/config
import { defineConfig } from 'dumi';
const path = require('path');

export default defineConfig({
title: 'rc-queue-anim',
favicon:
'https://zos.alipayobjects.com/rmsportal/HzvPfCGNCtvGrdk.png',
logo:
'https://zos.alipayobjects.com/rmsportal/TOXWfHIUGHvZIyb.svg',
outputPath: '.doc',
alias: {
'rc-queue-anim/es': path.join(__dirname, 'src'),
'rc-queue-anim/lib': path.join(__dirname, 'src'),
},
});
Loading