Skip to content

Commit 5d4404d

Browse files
Update build (#4)
* 🔧 build: Redo build scripts with vite. * 🦄 refactor: Remove generation of translated-language-lists. * 🦄 refactor: Prettier & lint. * 🔧 build: Update pipeline. * 📃 docs: Update readme. * 📃 docs: Add more links to readme. * 🔧 build: Read built languages from env. * 💥 breaking: Change files path in package.json * 🦄 refactor: Prettier & lint. * 🔧 chore: Delete ignored file * 🔧 chore: Update CI * 🔧 chore: Update .gitignore * 🔧 chore: Use import.meta * 🔧 chore: Update deps, use beta @localazy configs for lint/prettier/tsconfig * 💄 style: Fix prettier * 💄 style: Fix lint * 🔧 chore: Update tsconfig * 🔧 chore: Add husky * 🔧 chore: Format generated file with prettier --------- Co-authored-by: Honza Bubeník <[email protected]>
1 parent 460e412 commit 5d4404d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+18488
-18387
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GENERATE_LOCALES=cs,es,de

.env.example

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/.build.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/localazy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Upload Locales
2+
3+
on:
4+
push:
5+
paths:
6+
- 'src/data/translations/*.json'
7+
branches: [main]
8+
9+
jobs:
10+
localazy-upload:
11+
name: Upload strings to Localazy
12+
runs-on: [self-hosted, Linux]
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Upload locales
18+
uses: localazy/upload@v1
19+
with:
20+
read_key: ${{ secrets.LOCALAZY_READ_KEY }}
21+
write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}

.github/workflows/qa.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: QA checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
qa:
10+
name: Code Quality
11+
runs-on: [self-hosted, Linux]
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version-file: .nvmrc
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Lint source files
25+
run: npm run lint
26+
27+
- name: Prettier
28+
run: npm run prettier
29+
30+
- name: Build package
31+
run: npm run build

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
ci:
14+
name: CI Init
15+
runs-on: [self-hosted, Linux]
16+
outputs:
17+
action: ${{ steps.init.outputs.action }}
18+
steps:
19+
- id: init
20+
uses: localazy/release/init@v2
21+
22+
prepare:
23+
name: Prepare Release PR
24+
needs: ci
25+
if: needs.ci.outputs.action == 'prepare'
26+
runs-on: [self-hosted, Linux]
27+
steps:
28+
- uses: localazy/release/prepare@v2
29+
with:
30+
node-version-file: .nvmrc
31+
app-id: ${{ secrets.AUTH_APP_ID }}
32+
app-key: ${{ secrets.AUTH_APP_KEY }}
33+
npm-token: ${{ secrets.NPM_AUTH_TOKEN_PUBLIC }}
34+
35+
publish:
36+
name: Publish Release
37+
needs: ci
38+
if: needs.ci.outputs.action == 'publish'
39+
runs-on: [self-hosted, Linux]
40+
steps:
41+
- uses: localazy/release/publish@v2
42+
with:
43+
node-version-file: .nvmrc
44+
app-id: ${{ secrets.AUTH_APP_ID }}
45+
app-key: ${{ secrets.AUTH_APP_KEY }}
46+
npm-publish: public
47+
npm-token: ${{ secrets.NPM_AUTH_TOKEN_PUBLIC }}

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
node_modules
22
/lib
3+
/dist
34
/coverage
4-
.env
5+
localazy.keys.json
6+
/bin
7+
8+
# IDE/Editor
9+
.idea
10+
.vscode
11+
12+
# Husky hooks
13+
.husky/_/
14+
15+
# Prettier and ESLint cache
16+
.cache

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run check

.nvmrc

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

.prettierignore

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

0 commit comments

Comments
 (0)