Skip to content

Commit

Permalink
feat: 代码重构
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxingkang committed Jan 24, 2024
1 parent a1272dd commit 7628827
Show file tree
Hide file tree
Showing 10 changed files with 12,122 additions and 18,578 deletions.
12 changes: 12 additions & 0 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'father';

export default defineConfig({
cjs: {
output: 'lib',
transformer: 'esbuild',
},
esm: {
output: 'es',
transformer: 'esbuild',
},
})
14 changes: 14 additions & 0 deletions .github/workflows/emoji-helper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Emoji Helper

on:
release:
types: [published]

jobs:
emoji:
runs-on: ubuntu-latest
steps:
- uses: actions-cool/emoji-helper@v1.0.0
with:
type: 'release'
emoji: '+1, laugh, heart, hooray, rocket, eyes'
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

env:
NODE_OPTIONS: --max-old-space-size=6144

on:
workflow_dispatch:

jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 'Setup Node.js'
uses: actions/setup-node@v4
with:
node-version: 20

- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Pnpm action
uses: pnpm/action-setup@v2
with:
version: latest
run_install: true

- name: Build
run: pnpm build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Build
es
lib

# Test
Expand Down
7 changes: 0 additions & 7 deletions .walrusrc.ts

This file was deleted.

43 changes: 16 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,37 @@
"version": "1.2.0",
"description": "react fullscreen component",
"main": "lib/index.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts",
"module": "es/index.esm.js",
"types": "es/index.d.ts",
"files": [
"es",
"lib"
],
"repository": "git@github.com:pansyjs/react-fullscreen.git",
"author": "Pansy Team",
"license": "MIT",
"scripts": {
"build": "pansy",
"build": "father build",
"start": "dumi dev",
"doc:build": "dumi build",
"prettier": "walrus prettier",
"lint": "walrus lint",
"lint:commit": "walrus commitlint --env HUSKY_GIT_PARAMS",
"release": "walrus release"
"doc:build": "dumi build"
},
"peerDependencies": {
"react": ">=16.0.0",
"react-dom": ">=16.0.0"
"react": ">=16.9.0",
"react-dom": ">=16.9.0"
},
"dependencies": {
"@pansy/hooks": "^2.0.1"
"@pansy/classnames": "^1.0.1",
"@pansy/react-hooks": "^2.4.0"
},
"devDependencies": {
"@types/react": "^16.9.17",
"@types/react-dom": "^16.9.4",
"@walrus/cli": "^1.3.0",
"@walrus/pansy": "^0.3.0",
"@walrus/plugin-release": "^1.8.0",
"@walrus/preset-lint": "^1.1.5",
"dumi": "^1.0.31",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"dumi": "^2.0.0",
"father": "^4.3.8",
"husky": "^3.1.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"typescript": "^3.9.5"
},
"husky": {
"hooks": {
"pre-commit": "yarn prettier",
"commit-msg": "yarn lint:commit"
}
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 7628827

Please sign in to comment.