Skip to content

Commit 5aa3eb7

Browse files
authored
Fix broken stroking(this title is uso a bit) (#81)
1 parent 3fa185b commit 5aa3eb7

File tree

467 files changed

+39323
-21125
lines changed

Some content is hidden

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

467 files changed

+39323
-21125
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[*.{ts,tsx,js}]
1+
[*.{ts,tsx,js,yml,json}]
22
indent_size = 2
33
indent_style = space

.github/actions/building/action.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Building
2+
description: Build all packages
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Build (shared-lib)
8+
shell: bash
9+
working-directory: ./pkgs/shared-lib
10+
run: |
11+
pwd
12+
yarn build
13+
14+
- name: Build (chat)
15+
shell: bash
16+
working-directory: ./pkgs/chat
17+
run: |
18+
pwd
19+
yarn build
20+
21+
- name: Build (core)
22+
shell: bash
23+
working-directory: ./pkgs/core
24+
run: |
25+
pwd
26+
yarn build
27+
28+
- name: Build (editor)
29+
shell: bash
30+
working-directory: ./pkgs/editor
31+
run: |
32+
pwd
33+
yarn build
34+
35+
- name: Build (chat)
36+
shell: bash
37+
working-directory: ./pkgs/editor
38+
run: |
39+
pwd
40+
yarn build
41+
42+
- name: Build (web)
43+
shell: bash
44+
working-directory: ./pkgs/web2
45+
run: |
46+
pwd
47+
yarn build

.github/actions/setup/action.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Yarn install and build
2+
description: Install dependencies and build the project
3+
4+
inputs:
5+
node-version:
6+
required: true
7+
os:
8+
required: true
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- uses: actions/cache@v3
14+
with:
15+
path: |
16+
.yarn/cache
17+
node_modules/
18+
key: ${{ inputs.os }}-node${{ inputs.node-version }}-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
19+
restore-keys: |
20+
${{ inputs.os }}-node${{ inputs.node-version }}-
21+
22+
- name: Install native libs
23+
shell: bash
24+
run: |
25+
sudo apt-get update -y
26+
27+
# for node-canvas
28+
sudo apt-get install xserver-xorg-dev libxi-dev libxext-dev
29+
30+
- name: Setup Node.js for use with actions
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: ${{ inputs.node-version }}
34+
35+
- name: Install dependencies
36+
shell: bash
37+
run: yarn install

.github/workflows/ci.yml

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
setup-and-build:
7+
strategy:
8+
matrix:
9+
node-version: [20.x]
10+
os: [ubuntu-latest]
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: ./.github/actions/setup
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
21+
- uses: ./.github/actions/building
22+
23+
testing:
24+
needs: setup-and-build
25+
strategy:
26+
matrix:
27+
os: [ubuntu-latest]
28+
node-version: [20.x]
29+
30+
runs-on: ${{ matrix.os }}
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: ./.github/actions/setup
36+
with:
37+
node-version: ${{ matrix.node-version }}
38+
os: ${{ matrix.os }}
39+
40+
- uses: ./.github/actions/building
41+
42+
- name: Testing @paplico/core-new
43+
continue-on-error: true
44+
run: |
45+
cd pkgs/core
46+
# yarn prepublishOnly
47+
yarn test
48+
49+
- name: Testing @paplico/editor
50+
continue-on-error: true
51+
run: |
52+
cd pkgs/editor
53+
# yarn prepublishOnly
54+
yarn test
55+
56+
- name: Testing @paplico/web2
57+
continue-on-error: true
58+
run: |
59+
cd pkgs/web2
60+
yarn test
61+
62+
bundle-size:
63+
needs: setup-and-build
64+
strategy:
65+
matrix:
66+
os: [ubuntu-latest]
67+
node-version: [20.x]
68+
69+
runs-on: ${{ matrix.os }}
70+
71+
steps:
72+
- uses: actions/checkout@v4
73+
74+
- uses: ./.github/actions/setup
75+
with:
76+
node-version: ${{ matrix.node-version }}
77+
os: ${{ matrix.os }}
78+
79+
- uses: ./.github/actions/building
80+
81+
- uses: preactjs/compressed-size-action@v2
82+
with:
83+
pattern: './pkgs/core/dist/*.{js,mjs}'
84+
exclude: './pkgs/core/dist/*-*.{js,mjs}'
85+

.github/workflows/deploy.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deoloy
2+
3+
on: [push]
4+
5+
jobs:
6+
deploy:
7+
strategy:
8+
matrix:
9+
node-version: [20.x]
10+
os: [ubuntu-latest]
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: ./.github/actions/setup
18+
env:
19+
BUILD_TARGET_ENV: 'production'
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
23+
- uses: ./.github/actions/building
24+
25+
- name: Deploying to Vercel
26+
uses: amondnet/[email protected]
27+
with:
28+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
29+
github-token: ${{ secrets.GITHUB_TOKEN }}
30+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
31+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
32+
working-directory: ./pkgs/web2

.github/workflows/testing.yml

-57
This file was deleted.

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,5 @@ dist
106106
.DS_Store
107107
.yarn/cache
108108
.yarn/install-state.gz
109+
110+
pkgs/web2/public/fonts

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
# yarn prettier --write

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"semi": false,
33
"singleQuote": true,
4-
"trailingComma": "all"
4+
"trailingComma": "all",
5+
"parser": "typescript"
56
}

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"**/bower_components": true,
55
"**/*.code-search": true,
66
"**/.next": true,
7-
"**/*.{d.ts,mjs,umd.js}": true
7+
"**/*.{d.ts,mjs,umd.js}": true,
8+
"pkgs/core/dist/**/*": true
89
},
910
"typescript.tsdk": "./node_modules/typescript/lib",
1011
"typescript.preferences.importModuleSpecifier": "shortest",

bundle-size-report.config.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[
2+
{
3+
"sourceFilePath": "./pkgs/core/dist/index.js",
4+
"sizeUnit": "kb"
5+
},
6+
{
7+
"sourceFilePath": "./pkgs/core/dist/index.mjs",
8+
"sizeUnit": "kb"
9+
},
10+
{
11+
"sourceFilePath": "./pkgs/core/dist/ext-brush.js",
12+
"sizeUnit": "kb"
13+
},
14+
{
15+
"sourceFilePath": "./pkgs/core/dist/ext-brush.mjs",
16+
"sizeUnit": "kb"
17+
},
18+
{
19+
"sourceFilePath": "./pkgs/core/dist/extras.js",
20+
"sizeUnit": "kb"
21+
},
22+
{
23+
"sourceFilePath": "./pkgs/core/dist/extras.mjs",
24+
"sizeUnit": "kb"
25+
}
26+
{
27+
"sourceFilePath": "./pkgs/editor/dist/index.umd.js",
28+
"sizeUnit": "kb"
29+
},
30+
{
31+
"sourceFilePath": "./pkgs/editor/dist/index.mjs",
32+
"sizeUnit": "kb"
33+
},
34+
]

package.json

+13-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,21 @@
66
"pkgs/*"
77
],
88
"scripts": {
9-
"dev": "wsrun -p @paplico/web2 @paplico/jsondiffpatch @paplico/core-new -c dev",
10-
"build": "wsrun -p @paplico/jsondiffpatch @paplico/web2 @paplico/core-new -c build",
11-
"start": "cd pkgs/web; yarn start"
9+
"dev": "BUILD_TARGET_ENV=development wsrun -p @paplico/shared-lib @paplico/web2 @paplico/core-new @paplico/editor -c dev",
10+
"build": "BUILD_TARGET_ENV=production wsrun -p @paplico/shared-lib @paplico/web2 @paplico/core-new @paplico/editor -c build",
11+
"start": "cd pkgs/web; yarn start",
12+
"prepare": "husky install"
1213
},
1314
"devDependencies": {
14-
"prettier": "^3.0.0",
15+
"@mdx-js/loader": "^3.0.0",
16+
"@mdx-js/react": "^3.0.0",
17+
"@next/mdx": "^14.0.1",
18+
"@types/mdx": "^2.0.9",
19+
"autoprefixer": "^10.4.16",
20+
"husky": "^8.0.0",
21+
"postcss": "^8.4.31",
22+
"prettier": "^3.0.3",
23+
"tailwindcss": "^3.3.5",
1524
"wsrun": "^5.2.4"
1625
},
1726
"packageManager": "[email protected]"

pkgs/chat/package.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "@paplico/chat",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"exports": {
6+
"./server": {
7+
"import": "./dist/server.mjs",
8+
"types": "./dist/server.d.ts",
9+
"require": "./dist/server.js"
10+
},
11+
"./client": {
12+
"import": "./dist/client.mjs",
13+
"types": "./dist/client.d.ts",
14+
"require": "./dist/client.js"
15+
}
16+
},
17+
"scripts": {
18+
"test": "vitest",
19+
"dev": "vite build --watch",
20+
"prepublishOnly": "yarn build",
21+
"build": "vite build"
22+
},
23+
"devDependencies": {
24+
"@rollup/plugin-typescript": "^9.0.2",
25+
"@types/pusher-js": "^5.1.0",
26+
"rollup-plugin-node-externals": "^6.1.2",
27+
"typescript": "^5.0.4",
28+
"vite": "^4.5.0",
29+
"vite-plugin-dts": "^3.5.3",
30+
"vite-tsconfig-paths": "^4.2.0",
31+
"vitest": "^0.34.3"
32+
},
33+
"dependencies": {
34+
"@paplico/core": "*",
35+
"ws": "^8.14.2"
36+
},
37+
"optionalDependencies": {
38+
"pusher-js": "^8.3.0"
39+
}
40+
}

0 commit comments

Comments
 (0)