Skip to content

Commit 72d8391

Browse files
committed
ci(setup): setup lib
1 parent 1cf2e8a commit 72d8391

21 files changed

+6628
-0
lines changed

.cz.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[tool.commitizen]
2+
name = "cz_conventional_commits"
3+
tag_format = "v$version"
4+
version_scheme = "semver"
5+
version_provider = "npm"
6+
update_changelog_on_bump = true

.eslintrc.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// eslint-disable-next-line no-undef
2+
module.exports = {
3+
env: {
4+
node: true,
5+
},
6+
extends: ['ruiaraujo-react'],
7+
};

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [ruiaraujo012]

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: ci
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: override release tag
8+
required: false
9+
push:
10+
branches: ['main', 'alpha', 'beta']
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
publish:
18+
name: Publish
19+
20+
if: github.repository == 'RekStack/mui-form'
21+
22+
permissions:
23+
contents: write # to be able to publish a GitHub release
24+
issues: write # to be able to comment on released issues
25+
pull-requests: write # to be able to comment on released pull requests
26+
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: '0'
33+
- name: Setup pnpm
34+
uses: pnpm/action-setup@v3
35+
with:
36+
version: 8
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version-file: .nvmrc
41+
cache: pnpm
42+
- name: Install dependencies
43+
run: pnpm install --frozen-lockfile --prefer-offline
44+
- name: Publish
45+
run: |
46+
git config --global user.name 'Rui Araújo'
47+
git config --global user.email '[email protected]'
48+
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
49+
pnpm run cipublish
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
54+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
TAG: ${{ inputs.tag }}

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.11.1

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
repos:
2+
- hooks:
3+
- id: commitizen
4+
- id: commitizen-branch
5+
stages:
6+
- push
7+
repo: https://github.com/commitizen-tools/commitizen
8+
rev: v3.20.0

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
**/node_modules
2+
**/dist
3+
**/build
4+
**/package.json
5+
**/yarn.lock
6+
**/package-lock.json
7+
**/pnpm-lock.yaml

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# MUI-Form
2+
3+
A collection of Material UI form inputs designed for seamless integration with React Hook Form.

package.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"name": "@rekstack/mui-form",
3+
"version": "1.0.0",
4+
"description": "A collection of Material UI form inputs designed for seamless integration with React Hook Form.",
5+
"author": {
6+
"name": "Rui Araújo"
7+
},
8+
"license": "MIT",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/RekStack/mui-form.git"
12+
},
13+
"funding": {
14+
"type": "github",
15+
"url": "https://github.com/sponsors/ruiaraujo012"
16+
},
17+
"type": "module",
18+
"types": "dist/esm/index.d.ts",
19+
"main": "dist/cjs/index.cjs",
20+
"module": "dist/esm/index.js",
21+
"exports": {
22+
".": {
23+
"import": {
24+
"types": "./dist/esm/index.d.ts",
25+
"default": "./dist/esm/index.js"
26+
},
27+
"require": {
28+
"types": "./dist/cjs/index.d.cts",
29+
"default": "./dist/cjs/index.cjs"
30+
}
31+
},
32+
"./package.json": "./package.json"
33+
},
34+
"sideEffects": false,
35+
"scripts": {
36+
"build": "rimraf ./dist && tsc && vite build && publint --strict",
37+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
38+
"cipublish": "node scripts/publish.js"
39+
},
40+
"keywords": [
41+
"react",
42+
"react-hook-form",
43+
"mui",
44+
"material-ui",
45+
"form",
46+
"typescript"
47+
],
48+
"engines": {
49+
"node": ">=18"
50+
},
51+
"files": [
52+
"dist",
53+
"src"
54+
],
55+
"devDependencies": {
56+
"@tanstack/config": "^0.6.0",
57+
"@types/node": "^20.11.30",
58+
"@types/react": "^18.2.66",
59+
"@types/react-dom": "^18.2.22",
60+
"@typescript-eslint/eslint-plugin": "^7.2.0",
61+
"@typescript-eslint/parser": "^7.2.0",
62+
"@vitejs/plugin-react-swc": "^3.5.0",
63+
"eslint": "^8.57.0",
64+
"eslint-config-ruiaraujo-react": "^3.1.25",
65+
"eslint-plugin-react-hooks": "^4.6.0",
66+
"eslint-plugin-react-refresh": "^0.4.6",
67+
"publint": "^0.2.7",
68+
"react": "^18.2.0",
69+
"react-dom": "^18.2.0",
70+
"rimraf": "^5.0.5",
71+
"typescript": "^5.2.2",
72+
"vite": "^5.2.0"
73+
},
74+
"peerDependencies": {
75+
"react": ">=18",
76+
"react-dom": ">=18"
77+
}
78+
}

0 commit comments

Comments
 (0)