-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 38430dc
Showing
79 changed files
with
9,105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'header-max-length': [0, 'always', 100], | ||
'scope-case': [0, 'always', 'pascal-case'] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
module.exports = { | ||
types: [ | ||
{ value: 'feat', name: '✨ feat:\tAdding a new feature' }, | ||
{ value: 'fix', name: '🐛 fix:\tFixing a bug' }, | ||
{ value: 'docs', name: '📝 docs:\tAdd or update documentation' }, | ||
{ | ||
value: 'style', | ||
name: '💄 style:\tAdd or update styles, ui or ux' | ||
}, | ||
{ | ||
value: 'refactor', | ||
name: '♻️ refactor:\tCode change that neither fixes a bug nor adds a feature' | ||
}, | ||
{ | ||
value: 'perf', | ||
name: '⚡️ perf:\tCode change that improves performance' | ||
}, | ||
{ | ||
value: 'test', | ||
name: '✅ test:\tAdding tests cases' | ||
}, | ||
{ | ||
value: 'chore', | ||
name: '🚚 chore:\tChanges to the build process or auxiliary tools\n\t\tand libraries such as documentation generation' | ||
}, | ||
{ value: 'revert', name: '⏪️ revert:\tRevert to a commit' }, | ||
{ | ||
value: 'build', | ||
name: '👷 build:\tAdd or update regards to build process' | ||
}, | ||
{ | ||
value: 'ci', | ||
name: '💚 ci:\tAdd or update regards to build process' | ||
} | ||
], | ||
scopes: [], | ||
|
||
scopeOverrides: { | ||
fix: [{ name: 'merge' }, { name: 'style' }, { name: 'test' }, { name: 'hotfix' }] | ||
}, | ||
|
||
allowCustomScopes: true, | ||
allowBreakingChanges: ['feat', 'fix'], | ||
// skip any questions you want | ||
skipQuestions: ['scope', 'footer', 'breaking'], | ||
subjectLimit: 100 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Make sure the line ending is in LF format (/n), for linting consistency | ||
* text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ko_fi: orefalo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Check PR title | ||
run-name: Check PR title | ||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Generating Docs | ||
run-name: Generate Docs into gh-pages | ||
permissions: | ||
contents: write | ||
|
||
on: # rebuild gh-pages when doc change on master | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'src/**' | ||
- '!src/lib/**' | ||
|
||
jobs: | ||
build-and-deploy: | ||
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
# Checkout | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# The whole Node.js and pnpm installation and caching | ||
# Based on https://github.com/pnpm/action-setup/tree/6e1964dde3397a825e79e4607ad57f3f7ca2c7cb#use-cache-to-reduce-installation-time | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 9 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "pnpm_cache_dir=$(pnpm store path)" >> ${GITHUB_OUTPUT} | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Svelte Sync | ||
run: npx svelte-kit sync | ||
|
||
# Build Frontend | ||
- name: Build Frontend | ||
run: pnpm run build | ||
env: | ||
BASE_PATH: /${{ github.event.repository.name }} | ||
|
||
# Deploy Docs | ||
- name: Deploy Docs 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: docs | ||
target-folder: docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Lint check & Testing | ||
run-name: Lint check & Testing | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
# Checkout | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# The whole Node.js and pnpm installation and caching | ||
# Based on https://github.com/pnpm/action-setup/tree/6e1964dde3397a825e79e4607ad57f3f7ca2c7cb#use-cache-to-reduce-installation-time | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 9 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "pnpm_cache_dir=$(pnpm store path)" >> ${GITHUB_OUTPUT} | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: SvelteKit Sync | ||
run: npx svelte-kit sync | ||
|
||
- name: Lint | ||
run: pnpm run lint | ||
|
||
- name: Svelte Sync | ||
if: success() || failure() # Run even if previous failed | ||
run: npx svelte-kit sync | ||
|
||
- name: Svelte Check | ||
if: success() || failure() # Run even if previous failed | ||
run: pnpm run check | ||
|
||
# Build Frontend | ||
- name: Build Frontend | ||
if: success() || failure() # Run even if previous failed | ||
run: pnpm run build | ||
|
||
# Cache Playwright | ||
- name: Cache Playwright | ||
if: success() || failure() # Run even if previous failed | ||
uses: actions/cache@v4 | ||
id: playwright_cache | ||
with: | ||
path: ~/.cache/ms-playwright | ||
key: ${{ runner.os }} # (not a good key) | ||
|
||
# Install Playwright | ||
- name: Install Playwright | ||
# if: steps.cache.outputs.cache-hit != 'true' | ||
run: npx playwright install --with-deps | ||
|
||
# Run Tests | ||
- name: Test | ||
run: pnpm run test | ||
env: | ||
DEBUG: pw:webserver | ||
|
||
# Upload test results | ||
- name: Upload test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-results | ||
path: test-results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Release package to NPM | ||
run-name: Release package to NPM | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release-please: | ||
if: github.repository == 'orefalo/${{ github.event.repository.name }}' # Prevent running on forks | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# The whole Node.js and pnpm installation and caching | ||
# Based on https://github.com/pnpm/action-setup/tree/6e1964dde3397a825e79e4607ad57f3f7ca2c7cb#use-cache-to-reduce-installation-time | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 9 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "pnpm_cache_dir=$(pnpm store path)" >> ${GITHUB_OUTPUT} | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: SvelteKit Sync | ||
run: npx svelte-kit sync | ||
|
||
- name: Svelte Package | ||
run: pnpm run package | ||
|
||
- name: Release Please | ||
uses: googleapis/release-please-action@v4 | ||
id: release | ||
with: | ||
release-type: node | ||
|
||
- name: Upload the packed package | ||
uses: actions/upload-release-asset@v1 | ||
if: ${{ steps.release.outputs.release_created }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
node-version: 20 | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: package/${{ github.event.repository.name }}-${{ steps.release.outputs.version }}.tgz | ||
asset_name: ${{ github.event.repository.name }}-${{ steps.release.outputs.version }}.tgz | ||
asset_content_type: application/gzip | ||
|
||
- name: Publish to NPM | ||
uses: JS-DevTools/npm-publish@v3 # will only deploy if version has changed | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: package/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.DS_Store | ||
**/node_modules/* | ||
/build | ||
/.svelte-kit | ||
/package | ||
/docs | ||
/example-temp | ||
/test-results | ||
.env | ||
.env.* | ||
!.env.example | ||
*.log | ||
.eslintcache | ||
vite.config.js.timestamp-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit "${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# pnpm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
engine-strict=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore files for PNPM, NPM and YARN | ||
pnpm-lock.yaml | ||
package-lock.json | ||
yarn.lock | ||
**/.svelte-kit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 120, | ||
"plugins": ["prettier-plugin-svelte"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true | ||
}, | ||
"hide-files.files": [], | ||
"files.eol": "\n", | ||
"editor.insertSpaces": false, | ||
"[typescript]": { | ||
"editor.tabSize": 4 | ||
}, | ||
"[javascript]": { | ||
"editor.tabSize": 4 | ||
} | ||
} |
Oops, something went wrong.