Skip to content

Commit

Permalink
0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyair committed Feb 7, 2020
1 parent 5043703 commit 57153cc
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { IBundleOptions } from 'father';

const options: IBundleOptions = {
entry: 'src/index.tsx',
// cjs: 'rollup',
esm: 'rollup',
// cjs: 'babel',
// esm: 'babel',
preCommit: { eslint: true, prettier: true },
// extraBabelPlugins: [['babel-plugin-import', { libraryName: 'antd', libraryDirectory: 'es', style: true }]],
};

export default options;
19 changes: 19 additions & 0 deletions .github/workflows/page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: GitHub Actions Build and Deploy Demo
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@master
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dict
BUILD_SCRIPT: yarn && yarn doc:build
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
# branches:
# - master

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- First Change
- Second Change
draft: false
prerelease: false
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn test
- run: yarn build
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
**/*.html
.umi
.umi-production

/.github
21 changes: 18 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
{
"private": true,
"name": "yform-demo",
"version": "0.0.1",
"homepage": "https://crazyair.github.io/father-doc-yform",
"repository": {
"type": "git",
"url": "https://github.com/crazyair/father-doc-yform"
},
"description": "自定义表单组件",
"main": "dist/index.esm.js",
"typings": "dist/index.d.ts",
"authors": {
"name": "crazyair",
"email": "[email protected]"
},
"scripts": {
"start": "umi dev",
"build": "umi build",
"test": "umi test",
"lint": "eslint {src,mock,tests}/**/*.{ts,tsx} --fix",
"lint:es": "eslint --ext .js,jsx,ts,tsx src",
"lint:tsc": "tsc -p tsconfig.json --noEmit",
"precommit": "lint-staged",
"dev": "father-doc dev"
"build": "father build",
"dev": "father-doc dev",
"doc:build": "father-doc build"
},
"dependencies": {
"@ant-design/icons": "^4.0.0-rc.0",
Expand Down Expand Up @@ -46,6 +60,7 @@
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.11.1",
"father": "^2.29.2",
"father-doc": "^1.0.0-alpha.19",
"husky": "^0.14.3",
"lint-staged": "^7.2.2",
Expand Down

0 comments on commit 57153cc

Please sign in to comment.