Skip to content

Commit

Permalink
ci(setup): setup lib
Browse files Browse the repository at this point in the history
  • Loading branch information
ruiaraujo012 committed Mar 23, 2024
1 parent 1cf2e8a commit 72d8391
Show file tree
Hide file tree
Showing 21 changed files with 6,628 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .cz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "semver"
version_provider = "npm"
update_changelog_on_bump = true
7 changes: 7 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// eslint-disable-next-line no-undef
module.exports = {
env: {
node: true,
},
extends: ['ruiaraujo-react'],
};
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [ruiaraujo012]
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: ci

on:
workflow_dispatch:
inputs:
tag:
description: override release tag
required: false
push:
branches: ['main', 'alpha', 'beta']

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

jobs:
publish:
name: Publish

if: github.repository == 'RekStack/mui-form'

permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Publish
run: |
git config --global user.name 'Rui Araújo'
git config --global user.email '[email protected]'
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm run cipublish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ inputs.tag }}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.11.1
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- hooks:
- id: commitizen
- id: commitizen-branch
stages:
- push
repo: https://github.com/commitizen-tools/commitizen
rev: v3.20.0
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/node_modules
**/dist
**/build
**/package.json
**/yarn.lock
**/package-lock.json
**/pnpm-lock.yaml
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# MUI-Form

A collection of Material UI form inputs designed for seamless integration with React Hook Form.
78 changes: 78 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"name": "@rekstack/mui-form",
"version": "1.0.0",
"description": "A collection of Material UI form inputs designed for seamless integration with React Hook Form.",
"author": {
"name": "Rui Araújo"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/RekStack/mui-form.git"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/ruiaraujo012"
},
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js",
"exports": {
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
},
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"build": "rimraf ./dist && tsc && vite build && publint --strict",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"cipublish": "node scripts/publish.js"
},
"keywords": [
"react",
"react-hook-form",
"mui",
"material-ui",
"form",
"typescript"
],
"engines": {
"node": ">=18"
},
"files": [
"dist",
"src"
],
"devDependencies": {
"@tanstack/config": "^0.6.0",
"@types/node": "^20.11.30",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^8.57.0",
"eslint-config-ruiaraujo-react": "^3.1.25",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"publint": "^0.2.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.5",
"typescript": "^5.2.2",
"vite": "^5.2.0"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
}
}
Loading

0 comments on commit 72d8391

Please sign in to comment.