Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
############################
# EditorConfig file #
# https://editorconfig.org #
############################

root = true

[*]
indent_style = tab
indent_size = tab
#tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100

[*.{json,yml,yaml,md}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
23 changes: 0 additions & 23 deletions .eslintrc.json

This file was deleted.

10 changes: 10 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail -x
#####################################
# Git hook file #
# https://git-scm.com/docs/githooks #
#####################################

export PATH="node_modules/.bin:${PATH}"

lint-staged --verbose
22 changes: 22 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
################################################################################################################################################################
# GitHub release notes config file #
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes #
################################################################################################################################################################

changelog:
categories:
- title: BREAKING CHANGES
labels:
- breaking

- title: General
labels:
- '*'
exclude:
labels:
- breaking
- dependencies

- title: Dependencies
labels:
- dependencies
16 changes: 16 additions & 0 deletions .github/renovate.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************/
/* Mend Renovate config file */
/* https://docs.renovatebot.com/configuration-options/ */
/*******************************************************/

{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:js-lib", "github>jonasgeiler/renovate-config"],
"packageRules": [
{
"matchDatasources": ["npm"],
"matchPackageNames": ["beercss"],
"enabled": false
}
]
}
21 changes: 21 additions & 0 deletions .github/workflows/check-github-actions-workflows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check GitHub Actions Workflows

on:
push:
branches:
- main
- 'renovate/**'
paths: &paths
- '.github/workflows/*.ya?ml'

pull_request:
branches:
- main
paths: *paths

workflow_call:
workflow_dispatch:

jobs:
_:
uses: jonasgeiler/.github/.github/workflows/check-github-actions-workflows.yaml@main
29 changes: 29 additions & 0 deletions .github/workflows/check-shell-scripts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check Shell Scripts

on:
push:
branches:
- main
- 'renovate/**'
paths: &paths
- '**.ash'
- '**.bash'
- '**.bats'
- '**.dash'
- '**.ksh'
- '**.sh'
- '.githooks/*'

- .github/workflows/check-shell-scripts.ya?ml

pull_request:
branches:
- main
paths: *paths

workflow_call:
workflow_dispatch:

jobs:
_:
uses: jonasgeiler/.github/.github/workflows/check-shell-scripts.yaml@main
81 changes: 81 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Check

on:
push:
branches:
- main
- 'renovate/**'

pull_request:
branches:
- main

workflow_dispatch:
workflow_call:
inputs:
skip-build:
required: false
default: false
type: boolean

jobs:
code-quality:
name: Code Quality

runs-on: ubuntu-latest
defaults:
run:
shell: bash --noprofile --norc -euxo pipefail {0}

steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10

- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: package.json
cache: pnpm

- name: Install dependencies
run: |
pnpm install
pnpm exec playwright install --with-deps

- name: Run all checks
run: pnpm run check

build:
name: Build
if: inputs.skip-build != true

runs-on: ubuntu-latest
defaults:
run:
shell: bash --noprofile --norc -euxo pipefail {0}

steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10

- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: package.json
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build project
run: pnpm build
50 changes: 0 additions & 50 deletions .github/workflows/check.yml

This file was deleted.

16 changes: 13 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ env:
IS_PRERELEASE: ${{ contains(github.ref_name, '-') || startsWith(github.ref_name, 'v0.') }}

jobs:
pre-check:
name: Pre-Check
uses: ./.github/workflows/check.yaml
with:
skip-build: true

publish-package-and-create-github-release:
name: Publish package and create GitHub release
needs: pre-check

runs-on: ubuntu-latest
defaults:
Expand All @@ -29,6 +36,9 @@ jobs:
with:
persist-credentials: false

- name: Set up pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10

- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
Expand All @@ -38,7 +48,7 @@ jobs:
package-manager-cache: false

- name: Install dependencies
run: npm install
run: pnpm install

- name: Replace GitHub-flavored Markdown alerts with standard Markdown
run: sed -i 's/^> *\[\!\([a-zA-Z]\)\([a-zA-Z]*\)\] */> **\U\1\L\2** /g' ./*.md
Expand All @@ -50,10 +60,10 @@ jobs:
- name: Stage publishing package to npmjs.com
env:
TAG: ${{ env.IS_PRERELEASE == 'true' && 'next' || 'latest' }}
run: npm publish --access=public --no-git-checks --tag="${TAG}"
run: pnpm publish --access=public --no-git-checks --tag="${TAG}"

- name: Create package tarball
run: npm pack
run: pnpm pack

- name: Create GitHub release
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
Expand Down
50 changes: 45 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
######################################
# Git ignore file #
# https://git-scm.com/docs/gitignore #
######################################

# OS
.DS_Store
node_modules
test/public/bundle.js
.idea
dist
pnpm-lock.yaml
Thumbs.db

# Editor/IDE
.idea/*
!.idea/externalDependencies.xml
!.idea/icon.svg
.vscode/*
!.vscode/extensions.json

# Dependencies
node_modules/
.pnp/
.pnp.js
package-lock.json
yarn.lock
bun.lock
bun.lockb

# Env
.env.local
.env.*.local

# Typescript
*.tsbuildinfo

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

# Output
.output/
.vercel/
.netlify/
.wrangler/
/.svelte-kit/
/build/
/dist/
/test-results/
*.tgz
7 changes: 7 additions & 0 deletions .idea/externalDependencies.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/icon.svg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading