Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bennycode authored Jun 5, 2024
0 parents commit 5808849
Show file tree
Hide file tree
Showing 38 changed files with 12,266 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "@tstv/eslint-config",
"ignorePatterns": ["docs", "vitest.config.ts"]
}
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://help.github.com/articles/dealing-with-line-endings/
* text eol=lf

# Don't modify line endings of binary files
*.eot binary
*.jar binary
*.jpg binary
*.otf binary
*.png binary
*.svg binary
*.ttf binary
*.woff binary
*.woff2 binary
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
day: 'tuesday'
interval: 'monthly'
time: '02:00'
timezone: 'Europe/Berlin'
- package-ecosystem: 'npm'
directory: '/'
schedule:
day: 'tuesday'
interval: 'monthly'
time: '02:00'
timezone: 'Europe/Berlin'
pull-request-branch-name:
separator: '-'
open-pull-requests-limit: 99
target-branch: 'main'
commit-message:
prefix: 'chore'
include: 'scope'
14 changes: 14 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'type: bug(fix) 🐞':
title: '^fix(\(.+\))?:.*'
'type: chore 🧹':
title: '^chore(\(.+\))?:.*'
'type: docs 📋':
title: '^docs(\(.+\))?:.*'
'type: feature ✨':
title: '^feat(\(.+\))?:.*'
'type: refactor 🔧':
title: '^refactor(\(.+\))?:.*'
'type: style 🎨':
title: '^style(\(.+\))?:.*'
'type: test 🧪':
title: '^test(\(.+\))?:.*'
22 changes: 22 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#example-configuration
changelog:
exclude:
authors:
- 'dependabot'
categories:
- title: 'New'
labels:
- 'type: feature ✨'
- title: 'Improved'
labels:
- 'type: docs 📋'
- 'type: style 🎨'
- title: 'Fixed'
labels:
- 'type: bug(fix) 🐞'
- title: 'Documentation'
labels:
- 'type: docs 📋'
- title: 'Other Changes'
labels:
- '*'
15 changes: 15 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Create Release'

on:
push:
tags:
- 'v*.*.*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 'Create Release'
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
14 changes: 14 additions & 0 deletions .github/workflows/generate-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Generate Labels'

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
label:
name: 'Label PR based on title'
runs-on: ubuntu-latest
steps:
- uses: srvaroa/labeler@v1.4
env:
GITHUB_TOKEN: ${{ github.token }}
26 changes: 26 additions & 0 deletions .github/workflows/merge-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Merge Dependencies'

# https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
on: [pull_request_target]

permissions:
pull-requests: write
contents: write

jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request#about-auto-merge
- name: 'Enable auto-merge on PR'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Approve PR'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
17 changes: 17 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on:
push:
branches:
- main
pull_request:

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

jobs:
test-coverage:
uses: bennycode/actions/.github/workflows/test-coverage.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.env
*hot-update.js*
.cache
.DS_Store
.idea/
.tsimp/
.vscode/
!.vscode/extensions.json
!.vscode/settings.json
config.json
coverage/
dist/
lerna-debug.log
node_modules/
npm-debug.log*
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
16 changes: 16 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"arrowParens": "avoid",
"bracketSameLine": false,
"bracketSpacing": false,
"endOfLine": "lf",
"printWidth": 120,
"proseWrap": "never",
"requirePragma": false,
"semi": true,
"singleAttributePerLine": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["vitest.explorer", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"search.exclude": {
"/docs/": true
},
"typescript.tsdk": "node_modules\\typescript\\lib"
}
Loading

0 comments on commit 5808849

Please sign in to comment.