Skip to content

Commit

Permalink
chore: clean up local dev tooling (tldraw#856)
Browse files Browse the repository at this point in the history
* chore: clean up husky + lint-staged

* chore: format all files with prettier
  • Loading branch information
with-heart authored Jul 28, 2022
1 parent 0985a2c commit 2e36dad
Show file tree
Hide file tree
Showing 57 changed files with 326 additions and 441 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn test
yarn run pre-commit
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn run pre-push
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"singleQuote": true,
"semi": false,
"printWidth": 100
}
}
2 changes: 1 addition & 1 deletion .turbo/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"teamId":"team_MjXkk3MAaGtBFaHcssVUiMgd","apiUrl":"https://api.vercel.com"}
{ "teamId": "team_MjXkk3MAaGtBFaHcssVUiMgd", "apiUrl": "https://api.vercel.com" }
2 changes: 1 addition & 1 deletion apps/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
"publish": null
},
"gitHead": "a7dac0f83ad998e205c2aab58182cb4ba4e099a6"
}
}
2 changes: 1 addition & 1 deletion apps/new-tab-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
"typescript": "^4.7.2",
"vite": "^2.9.8"
}
}
}
6 changes: 2 additions & 4 deletions apps/new-tab-extension/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"description": "A tiny little drawing app for your new tab screen.",
"version": "1.0",
"manifest_version": 3,
"permissions": [
"unlimitedStorage"
],
"permissions": ["unlimitedStorage"],
"default_icon": {
"16": "16.png",
"32": "32.png",
Expand All @@ -21,4 +19,4 @@
"chrome_url_overrides": {
"newtab": "index.html"
}
}
}
2 changes: 1 addition & 1 deletion apps/vscode/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
"typescript": "^4.7.3"
},
"gitHead": "a7dac0f83ad998e205c2aab58182cb4ba4e099a6"
}
}
2 changes: 1 addition & 1 deletion apps/vscode/editor/src/public/tldraw-assets.json

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions apps/vscode/extension/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/src/extension.ts"
],
"outFiles": [
"${workspaceFolder}/dist/web/**/*.js",
"!**/node_modules/**"
],
"skipFiles": [
"<node_internals>/**",
"**/node_modules/**"
],
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/dist/web/**/*.js", "!**/node_modules/**"],
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"sourceMaps": true
}
]
}
}
270 changes: 135 additions & 135 deletions apps/vscode/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,136 +1,136 @@
{
"name": "tldraw-vscode",
"displayName": "tldraw",
"description": "The tldraw Extension for VS Code.",
"version": "1.19.0",
"license": "MIT",
"publisher": "tldraw-org",
"repository": {
"type": "git",
"url": "https://github.com/tldraw/tldraw"
},
"engines": {
"vscode": "^1.59.0"
},
"keywords": [
"diagram",
"draw",
"drawing",
"sketch",
"design",
"documentation",
"tldraw"
],
"icon": "icon.png",
"galleryBanner": {
"color": "#1d1d1d",
"theme": "dark"
},
"categories": [
"Visualization"
],
"activationEvents": [
"onCustomEditor:tldraw.tldr",
"onCommand:tldraw.tldr.new"
],
"browser": "./dist/web/extension.js",
"main": "./dist/web/extension.js",
"extensionKind": [
"workspace"
],
"contributes": {
"customEditors": [
{
"viewType": "tldraw.tldr",
"displayName": "tldraw",
"selector": [
{
"filenamePattern": "*.tldr"
},
{
"filenamePattern": "*.tldr.json"
}
]
}
],
"keybindings": [
{
"key": "ctrl+shift+d",
"mac": "cmd+shift+d",
"title": "Toggle Dark Mode",
"command": "tldraw.tldr.toggleDarkMode",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+numpad_add",
"mac": "cmd+numpad_add",
"title": "Zoom In",
"command": "tldraw.tldr.zoomIn",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+=",
"mac": "cmd+=",
"title": "Zoom In",
"command": "tldraw.tldr.zoomIn",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+numpad_subtract",
"mac": "cmd+numpad_subtract",
"title": "Zoom Out",
"command": "tldraw.tldr.zoomOut",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+-",
"mac": "cmd+-",
"title": "Zoom Out",
"command": "tldraw.tldr.zoomOut",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+numpad0",
"mac": "cmd+numpad0",
"title": "Reset Zoom",
"command": "tldraw.tldr.resetZoom",
"category": "tldraw",
"when": "resourceExtname == .tldr"
}
],
"commands": [
{
"command": "tldraw.tldr.new",
"title": "New File",
"category": "tldraw"
}
]
},
"scripts": {
"start:vscode": "node scripts/dev",
"build:apps": "yarn build",
"build": "yarn package",
"web": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=.",
"package": "cd ../editor && yarn build && cd ../extension && node scripts/build && node scripts/package",
"publish": "yarn package && vsce publish",
"lint": "eslint src --ext ts"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"assert": "^2.0.0",
"eslint": "^8.8.0",
"mocha": "^9.1.1",
"process": "^0.11.10",
"ts-loader": "^9.2.5",
"tslib": "^2.4.0",
"typescript": "^4.7.3",
"vsce": "^2.2.0"
},
"gitHead": "4b1137849ad07da36fc8f0f19cb64e7535a79296"
}
"name": "tldraw-vscode",
"displayName": "tldraw",
"description": "The tldraw Extension for VS Code.",
"version": "1.19.0",
"license": "MIT",
"publisher": "tldraw-org",
"repository": {
"type": "git",
"url": "https://github.com/tldraw/tldraw"
},
"engines": {
"vscode": "^1.59.0"
},
"keywords": [
"diagram",
"draw",
"drawing",
"sketch",
"design",
"documentation",
"tldraw"
],
"icon": "icon.png",
"galleryBanner": {
"color": "#1d1d1d",
"theme": "dark"
},
"categories": [
"Visualization"
],
"activationEvents": [
"onCustomEditor:tldraw.tldr",
"onCommand:tldraw.tldr.new"
],
"browser": "./dist/web/extension.js",
"main": "./dist/web/extension.js",
"extensionKind": [
"workspace"
],
"contributes": {
"customEditors": [
{
"viewType": "tldraw.tldr",
"displayName": "tldraw",
"selector": [
{
"filenamePattern": "*.tldr"
},
{
"filenamePattern": "*.tldr.json"
}
]
}
],
"keybindings": [
{
"key": "ctrl+shift+d",
"mac": "cmd+shift+d",
"title": "Toggle Dark Mode",
"command": "tldraw.tldr.toggleDarkMode",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+numpad_add",
"mac": "cmd+numpad_add",
"title": "Zoom In",
"command": "tldraw.tldr.zoomIn",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+=",
"mac": "cmd+=",
"title": "Zoom In",
"command": "tldraw.tldr.zoomIn",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+numpad_subtract",
"mac": "cmd+numpad_subtract",
"title": "Zoom Out",
"command": "tldraw.tldr.zoomOut",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+-",
"mac": "cmd+-",
"title": "Zoom Out",
"command": "tldraw.tldr.zoomOut",
"category": "tldraw",
"when": "resourceExtname == .tldr"
},
{
"key": "ctrl+numpad0",
"mac": "cmd+numpad0",
"title": "Reset Zoom",
"command": "tldraw.tldr.resetZoom",
"category": "tldraw",
"when": "resourceExtname == .tldr"
}
],
"commands": [
{
"command": "tldraw.tldr.new",
"title": "New File",
"category": "tldraw"
}
]
},
"scripts": {
"start:vscode": "node scripts/dev",
"build:apps": "yarn build",
"build": "yarn package",
"web": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=.",
"package": "cd ../editor && yarn build && cd ../extension && node scripts/build && node scripts/package",
"publish": "yarn package && vsce publish",
"lint": "eslint src --ext ts"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"assert": "^2.0.0",
"eslint": "^8.8.0",
"mocha": "^9.1.1",
"process": "^0.11.10",
"ts-loader": "^9.2.5",
"tslib": "^2.4.0",
"typescript": "^4.7.3",
"vsce": "^2.2.0"
},
"gitHead": "4b1137849ad07da36fc8f0f19cb64e7535a79296"
}
2 changes: 1 addition & 1 deletion apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
"devDependencies": {
"next-transpile-modules": "^9.0.0"
}
}
}
2 changes: 1 addition & 1 deletion apps/www/pages/api/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default async function CreateMultiplayerRoom(req: NextApiRequest, res: Ne
Authorization: `Bearer ${process.env.LIVEBLOCKS_SECRET_KEY}`,
'Content-Type': 'application/json',
},
}).then(d => d.json())
}).then((d) => d.json())

// 2. Create the Liveblocks storage JSON

Expand Down
2 changes: 1 addition & 1 deletion apps/www/public/tldraw-assets.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/core-example-advanced/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
"react-dom": "^18.1.0"
},
"gitHead": "a7dac0f83ad998e205c2aab58182cb4ba4e099a6"
}
}
2 changes: 1 addition & 1 deletion examples/core-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
"react-dom": "^18.1.0"
},
"gitHead": "a7dac0f83ad998e205c2aab58182cb4ba4e099a6"
}
}
2 changes: 1 addition & 1 deletion examples/tldraw-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
"react-router-dom": "^6.3.0"
},
"gitHead": "a7dac0f83ad998e205c2aab58182cb4ba4e099a6"
}
}
2 changes: 1 addition & 1 deletion examples/tldraw-example/src/public/tldraw-assets.json

Large diffs are not rendered by default.

Loading

0 comments on commit 2e36dad

Please sign in to comment.