Skip to content

Commit 99de54c

Browse files
committed
Zip Figma plugin
1 parent ab76991 commit 99de54c

File tree

4 files changed

+223
-18
lines changed

4 files changed

+223
-18
lines changed

packages/figma/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/uimix-figma-plugin.zip

packages/figma/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"tsc": "npm run tsc:main && npm run tsc:ui",
1717
"tsc:main": "tsc --noEmit -p plugin-src",
1818
"tsc:ui": "tsc --noEmit -p ui-src",
19-
"tsc:watch": "concurrently -n widget,iframe \"npm run tsc:main -- --watch --preserveWatchOutput\" \"npm run tsc:ui -- --watch --preserveWatchOutput\""
19+
"tsc:watch": "concurrently -n widget,iframe \"npm run tsc:main -- --watch --preserveWatchOutput\" \"npm run tsc:ui -- --watch --preserveWatchOutput\"",
20+
"package": "ts-node scripts/packageZip.ts"
2021
},
2122
"dependencies": {
2223
"@iconify/react": "^4.1.0",
@@ -35,13 +36,17 @@
3536
"@types/node": "^18.16.0",
3637
"@types/react": "^18.0.38",
3738
"@types/react-dom": "^18.0.11",
39+
"@types/shelljs": "^0.8.12",
3840
"concurrently": "^7.6.0",
3941
"esbuild": "^0.17.18",
4042
"postcss": "^8.4.23",
43+
"shelljs": "^0.8.5",
4144
"tailwindcss": "^3.3.1",
45+
"ts-node": "^10.9.1",
4246
"typescript": "^5.0.4",
4347
"vite": "^4.3.1",
4448
"vite-plugin-singlefile": "^0.13.5",
45-
"vitest": "^0.30.1"
49+
"vitest": "^0.30.1",
50+
"zip-a-folder": "^1.1.5"
4651
}
4752
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import shell from "shelljs";
2+
import { zip } from "zip-a-folder";
3+
4+
const name = `uimix-figma-plugin`;
5+
6+
async function run() {
7+
shell.mkdir(name);
8+
shell.cp("manifest.json", `${name}/`);
9+
shell.cp("-r", "dist", `${name}/`);
10+
await zip(name, `${name}.zip`);
11+
shell.rm("-rf", name);
12+
}
13+
14+
run();

0 commit comments

Comments
 (0)