[big chore] restore core to monorepo (#287)
* move core into repo, apps into apps folder, update tests * Update scripts for build:core * improve scripts * remove noise from www * Update .gitignore * Fix focus bug * add ci test script * Update main.yml
8
.github/workflows/main.yml
vendored
|
@ -9,12 +9,8 @@ jobs:
|
||||||
- name: Install modules
|
- name: Install modules
|
||||||
run: yarn
|
run: yarn
|
||||||
# build
|
# build
|
||||||
- name: Build
|
- name: Build Packages
|
||||||
run: yarn build:packages
|
run: yarn build:packages
|
||||||
# run unit tests
|
# run unit tests
|
||||||
- name: Jest Annotations & Coverage
|
- name: Jest Annotations & Coverage
|
||||||
uses: mattallty/jest-github-action@v1.0.3
|
run: yarn test:ci
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
test-command: 'yarn test --ci --runInBand --updateSnapshot'
|
|
||||||
|
|
8
.gitignore
vendored
|
@ -9,8 +9,8 @@ docs/
|
||||||
coverage
|
coverage
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
www/public/worker-*
|
|
||||||
www/public/sw.js
|
|
||||||
www/public/sw.js.map
|
|
||||||
|
|
||||||
.vercel
|
.vercel
|
||||||
|
.next
|
||||||
|
apps/www/public/worker-*
|
||||||
|
apps/www/public/sw.js
|
||||||
|
apps/www/public/sw.js.map
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start:electron": "yarn dev",
|
"start:electron": "yarn dev",
|
||||||
|
"build:apps": "yarn build",
|
||||||
"dev": "electron-esbuild dev",
|
"dev": "electron-esbuild dev",
|
||||||
"build": "electron-esbuild build",
|
"build": "electron-esbuild build",
|
||||||
"package": "electron-builder"
|
"package": "electron-builder"
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": ["node_modules", "dist", "docs"],
|
"exclude": ["node_modules", "dist", "docs"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
@ -9,12 +9,12 @@
|
||||||
"allowJs": false,
|
"allowJs": false,
|
||||||
"emitDeclarationOnly": true,
|
"emitDeclarationOnly": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@tldraw/tldraw": ["../packages/tldraw"]
|
"@tldraw/tldraw": ["../../packages/tldraw"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../packages/tldraw"
|
"path": "../../packages/tldraw"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"typedocOptions": {
|
"typedocOptions": {
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
@ -12,7 +12,8 @@
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start:vscode": "node scripts/dev.mjs -w",
|
"start:vscode": "node scripts/dev.mjs -w",
|
||||||
"build": "node scripts/build.mjs"
|
"build": "node scripts/build.mjs",
|
||||||
|
"build:apps": "yarn build"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tldraw/tldraw": "^1.0.3",
|
"@tldraw/tldraw": "^1.0.3",
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig.base.json",
|
"extends": "../../../tsconfig.base.json",
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": ["node_modules", "dist", "docs"],
|
"exclude": ["node_modules", "dist", "docs"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
@ -8,13 +8,12 @@
|
||||||
"baseUrl": "src",
|
"baseUrl": "src",
|
||||||
"emitDeclarationOnly": false,
|
"emitDeclarationOnly": false,
|
||||||
"paths": {
|
"paths": {
|
||||||
"+*": ["./*"],
|
"@tldraw/tldraw": ["../../../packages/tldraw"]
|
||||||
"@tldraw/tldraw": ["../packages/tldraw"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../packages/tldraw"
|
"path": "../../../packages/tldraw"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"typedocOptions": {
|
"typedocOptions": {
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
@ -61,6 +61,8 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start:vscode": "node scripts/dev",
|
"start:vscode": "node scripts/dev",
|
||||||
|
"build:apps": "yarn build",
|
||||||
|
"build": "yarn package",
|
||||||
"web": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=.",
|
"web": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=.",
|
||||||
"package": "cd ../editor && yarn build && cd ../extension && node scripts/build && node scripts/package",
|
"package": "cd ../editor && yarn build && cd ../extension && node scripts/build && node scripts/package",
|
||||||
"publish": "yarn package && vsce publish",
|
"publish": "yarn package && vsce publish",
|
0
www/.gitignore → apps/www/.gitignore
vendored
0
www/next-env.d.ts → apps/www/next-env.d.ts
vendored
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "www",
|
"name": "@tldraw/www",
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "A tiny little drawing app (site).",
|
"description": "A tiny little drawing app (site).",
|
||||||
|
@ -11,6 +11,8 @@
|
||||||
"author": "@steveruizok",
|
"author": "@steveruizok",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
"build:apps": "yarn build",
|
||||||
|
"build:www": "yarn build",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"serve": "next serve",
|
"serve": "next serve",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 795 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |