Skip to content

Commit dd47937

Browse files
authored
Merge pull request #892 from live-codes/develop
release sdk-v0.12.0
2 parents a00c38a + 0fcb40d commit dd47937

File tree

200 files changed

+14428
-4948
lines changed

Some content is hidden

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

200 files changed

+14428
-4948
lines changed

.bundlewatch.config.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ module.exports = {
1212
path: './build/livecodes/*(app|embed|headless).*.js',
1313
maxSize: '120kB',
1414
},
15-
// {
16-
// path: './build/livecodes/lang-*.js',
17-
// maxSize: '10kB',
18-
// },
15+
{
16+
path: './build/livecodes/lang-*.js',
17+
maxSize: '10kB',
18+
},
1919
{
2020
path: './build/livecodes/*.css',
2121
maxSize: '25kB',
2222
},
23-
// {
24-
// path: './build/livecodes/i18n-*.json',
25-
// maxSize: '10kB',
26-
// },
23+
{
24+
path: './build/livecodes/i18n-*.json',
25+
maxSize: '15kB',
26+
},
2727
],
2828
defaultCompression: 'brotli',
2929
normalizeFilenames: /^.+?((\.[^.]{8,}}?)|())\.\w+$/,

.dockerignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
node_modules
2+
*/node_modules
3+
*/build
4+
docs/.docusaurus
5+
.vscode
6+
.jest
7+
build
8+
dist
9+
.cache
10+
**/*.log
11+
.env
12+
docs/docs/api
13+
docs/static/**/*.html.md
14+
docs/static/llms.txt
15+
docs/static/llms-full.txt
16+
/test-results/
17+
/playwright-report/
18+
/playwright/.cache/
19+
src/livecodes/i18n/locales/tmp/
20+
lokalise_tmp

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sh text eol=lf

.github/workflows/CI-type-checking.yml

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

.github/workflows/bundle-size.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Bundle Size
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: preactjs/compressed-size-action@v2
12+
with:
13+
build-script: 'build:app'
14+
pattern: './build/**/*.{js,css,html,json}'
15+
strip-hash: "\\b\\w{32}\\."
16+
minimum-change-threshold: 200
17+
compression: 'brotli'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Docker Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: SSH to server
13+
uses: appleboy/ssh-action@v1
14+
with:
15+
host: ${{ secrets.VPS_HOST }}
16+
username: ${{ secrets.VPS_USER }}
17+
key: ${{ secrets.VPS_KEY }}
18+
passphrase: ${{ secrets.VPS_PASSPHRASE }}
19+
script: |
20+
set -e
21+
cd livecodes
22+
git checkout main
23+
git pull origin main
24+
echo "${{ vars.VPS_ENV }}" > .env
25+
docker compose build
26+
docker compose up -d
27+
docker container prune -f
28+
docker image prune -a -f

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ jobs:
8282
CF_ZONE: ${{ secrets.CF_ZONE }}
8383
CF_TOKEN: ${{ secrets.CF_TOKEN }}
8484

85+
# - name: Build and Push to Docker Hub
86+
# run: |
87+
# echo ${{secrets.DOCKERHUB_TOKEN}} | docker login --username ${{ vars.DOCKERHUB_USERNAME }} --password-stdin
88+
# docker build -t ${{ vars.DOCKERHUB_USERNAME }}/livecodes:latest -t ${{ vars.DOCKERHUB_USERNAME }}/livecodes:${{steps.vars.outputs.version}} .
89+
# docker push ${{ vars.DOCKERHUB_USERNAME }}/livecodes:latest
90+
# docker push ${{ vars.DOCKERHUB_USERNAME }}/livecodes:${{steps.vars.outputs.version}}
91+
8592
- name: Publish SDK to NPM
8693
if: startsWith(github.head_ref, 'releases/sdk-v')
8794
run: |

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ dist
44
.cache
55
**/*.log
66
.env
7+
/ignore
8+
*.ignore.*
79
docs/docs/api
810
docs/static/**/*.html.md
911
docs/static/llms.txt
@@ -13,3 +15,4 @@ docs/static/llms-full.txt
1315
/playwright/.cache/
1416
src/livecodes/i18n/locales/tmp/
1517
lokalise_tmp
18+
/server/data

.jest/setup.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

.jest/setup.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pkg from '../package.json';
2+
import { languages } from '../src/livecodes/languages/languages';
3+
import { processors } from '../src/livecodes/languages/processors';
4+
5+
process.env.VERSION = pkg.appVersion;
6+
(window as any).deps = { languages, processors };

0 commit comments

Comments
 (0)