Skip to content

Commit

Permalink
First commit to 4.x (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrylinooo authored Nov 27, 2023
1 parent 6336da1 commit 844bb79
Show file tree
Hide file tree
Showing 40 changed files with 6,059 additions and 16,477 deletions.
40 changes: 34 additions & 6 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{
"env": {
"browser": true,
"es2021": true,
"jest/globals": true
"es2022": true,
"node": true
},
"root": true,
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"airbnb"
"plugin:react/jsx-runtime",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
Expand All @@ -19,11 +27,31 @@
"jsx-a11y",
"import",
"prettier",
"jest",
"@typescript-eslint"
],
"rules": {
"prettier/prettier": "error",
"object-curly-newline": 0,
"operator-linebreak": 0
"operator-linebreak": 0,
"complexity": ["error", 10]
},
"parser": "@typescript-eslint/parser",
"settings": {
"import/resolver": {
"alias": {
"map": [
[
"@",
"./src"
]
],
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
}
}
}
}
}
30 changes: 0 additions & 30 deletions .github/testing.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
release:
types: [created]

jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

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

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

- name: Update package.json version
run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version

- name: Build
run: npm run build

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/

- name: Commit and push
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git commit -am "Update version to ${{ github.event.release.tag_name }}"
git push
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}




4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Testing

on:
push:
branches: [ master, develop ]
branches: [ master, 4.x ]
pull_request:
branches: [ master, develop ]
branches: [ master, 4.x ]

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
node_modules
playground
coverage
dist
demo
dev
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@
.github
.vscode
.gitignore
.prettierrc
.eslintrc
.eslintignore
tsconfig.json
vite.config.ts
vitest.config.ts
vitest.setup.ts
README.md
node_modules
playground
tests
example
coverage
package-lock.json
Loading

0 comments on commit 844bb79

Please sign in to comment.