Skip to content

Commit 578577d

Browse files
committed
refactor: move extension and shared logic into real sub packages, improve build pipeline
1 parent bbddcda commit 578577d

File tree

185 files changed

+912
-503
lines changed

Some content is hidden

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

185 files changed

+912
-503
lines changed

.github/workflows/check-rewrite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jobs:
3535
run: pnpm install --frozen-lockfile
3636

3737
- name: Run check script
38-
run: pnpm exec tsx scripts/check-rewrite.ts
38+
run: pnpm --filter @tempad-dev/extension exec tsx ./scripts/check-rewrite.ts

.github/workflows/deploy-rewrite.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
run: pnpm install --frozen-lockfile
2727

2828
- name: Build rewrite script
29-
run: pnpm run build:rewrite
29+
run: pnpm --filter @tempad-dev/extension run build:rewrite
3030

3131
- name: Deploy to gh-pages
3232
uses: peaceiris/actions-gh-pages@v4
3333
with:
3434
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
publish_dir: ./dist
35+
publish_dir: ./packages/extension/dist

README.md

Lines changed: 3 additions & 4 deletions

eslint.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { fileURLToPath, URL } from 'node:url'
2+
13
import js from '@eslint/js'
24
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
35
import {
@@ -12,6 +14,8 @@ import pluginVue from 'eslint-plugin-vue'
1214
// Allow both TS and JS inside <script> of .vue files
1315
configureVueProject({ scriptLangs: ['ts', 'js'] })
1416

17+
const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url))
18+
1519
export default defineConfigWithVueTs(
1620
// Respect .gitignore
1721
gitignore(),
@@ -27,6 +31,11 @@ export default defineConfigWithVueTs(
2731
skipFormatting,
2832
// Project rules
2933
{
34+
languageOptions: {
35+
parserOptions: {
36+
tsconfigRootDir
37+
}
38+
},
3039
plugins: {
3140
perfectionist
3241
},

mcp-server/package.json

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

mcp-server/tsconfig.json

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

mcp/shared/types.ts

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

package.json

Lines changed: 15 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,31 @@
11
{
22
"name": "tempad-dev",
3-
"description": "Inspect panel on Figma, for everyone.",
3+
"description": "TemPad Dev monorepo",
44
"private": true,
55
"version": "0.14.0",
66
"type": "module",
7-
"scripts": {
8-
"dev": "wxt",
9-
"dev:firefox": "wxt -b firefox",
10-
"build": "wxt build && pnpm run build:rewrite && pnpm run build:plugins && pnpm run build:mcp && pnpm run build:readme",
11-
"build:firefox": "wxt build -b firefox",
12-
"build:rewrite": "esbuild ./rewrite/figma.ts --outfile=./dist/figma.js --bundle --format=iife && cp ./public/rules/figma.legacy.json ./dist/figma.json && cp ./public/rules/figma.legacy.json ./dist/figma.comply.json",
13-
"build:plugins": "pnpm --filter @tempad-dev/plugins run build",
14-
"build:mcp": "pnpm --filter @tempad-dev/mcp run build",
15-
"build:readme": "tsx ./build/readme.ts",
16-
"npm:plugins": "pnpm --filter @tempad-dev/plugins publish --access public",
17-
"npm:mcp": "pnpm --filter @tempad-dev/mcp publish --access public",
18-
"zip": "wxt zip",
19-
"zip:firefox": "wxt zip -b firefox",
20-
"compile": "vue-tsc --noEmit",
21-
"postinstall": "wxt prepare",
22-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
23-
"format": "prettier --write \"**/*.{js,ts,jsx,tsx,cjs,mjs,cts,mts,vue,json,md,css}\" --ignore-path .gitignore"
24-
},
257
"devDependencies": {
26-
"@figma/plugin-typings": "^1.121.0",
27-
"@modelcontextprotocol/sdk": "^1.22.0",
28-
"@rushstack/eslint-patch": "^1.15.0",
29-
"@types/node": "^24.10.1",
30-
"@types/prismjs": "^1.26.5",
31-
"@types/proper-lockfile": "^4.1.4",
32-
"@types/stringify-object": "^4.0.5",
33-
"@types/ws": "^8.18.1",
348
"@eslint/js": "^9.39.1",
9+
"@rushstack/eslint-patch": "^1.15.0",
3510
"@vue/eslint-config-prettier": "^10.2.0",
3611
"@vue/eslint-config-typescript": "^14.6.0",
37-
"@vueuse/core": "^14.0.0",
38-
"@wxt-dev/module-vue": "^1.0.3",
39-
"eslint-config-flat-gitignore": "^2.1.0",
40-
"comment-mark": "^2.0.1",
41-
"esbuild": "^0.27.0",
4212
"eslint": "^9.39.1",
13+
"eslint-config-flat-gitignore": "^2.1.0",
4314
"eslint-plugin-perfectionist": "^4.15.1",
4415
"eslint-plugin-vue": "^10.5.1",
45-
"nanoid": "^5.1.6",
46-
"overlayscrollbars": "^2.12.0",
47-
"p-limit": "^7.2.0",
48-
"p-wait-for": "^6.0.0",
49-
"pino": "^9.14.0",
50-
"playwright-chromium": "^1.56.1",
5116
"prettier": "^3.6.2",
52-
"proper-lockfile": "^4.1.2",
53-
"stringify-object": "^6.0.0",
54-
"tsx": "^4.20.6",
55-
"typescript": "^5.9.3",
56-
"typescript-eslint": "^8.19.1",
57-
"vite-plugin-css-injected-by-js": "^3.5.2",
58-
"vue": "^3.5.24",
59-
"vue-tsc": "^3.1.4",
60-
"ws": "^8.18.3",
61-
"wxt": "^0.20.11",
62-
"zod": "^4.1.12"
17+
"typescript": "^5.9.3"
18+
},
19+
"scripts": {
20+
"dev": "pnpm --filter @tempad-dev/extension dev",
21+
"build": "pnpm -r build",
22+
"build:ext": "pnpm --filter @tempad-dev/extension build",
23+
"build:plugins": "pnpm --filter @tempad-dev/plugins build",
24+
"build:mcp": "pnpm --filter @tempad-dev/mcp build",
25+
"lint": "pnpm -r lint",
26+
"format": "pnpm -r format",
27+
"typecheck": "pnpm -r typecheck",
28+
"zip": "pnpm --filter @tempad-dev/extension zip"
6329
},
6430
"pnpm": {
6531
"onlyBuiltDependencies": [

0 commit comments

Comments
 (0)