Skip to content

Commit c642735

Browse files
committed
fix: issue with manifest and build plugins
1 parent 017565e commit c642735

File tree

20 files changed

+52
-29
lines changed

20 files changed

+52
-29
lines changed

.github/scripts/release/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const release = async ({ github, context, workspace, zipName, srcDir }) => {
1818
github,
1919
context,
2020
release_id,
21-
assetName: zipName,
21+
assetName: `${zipName}.zip`,
2222
assetPath,
2323
});
2424
};

.github/scripts/release/zip-folder.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
import AdmZip from "adm-zip";
44

5+
import { existsSync } from "node:fs";
6+
57
const zipFolder = async (destPath, assetPath) => {
68
const zip = new AdmZip();
7-
zip.addLocalFolder(`${destPath}/dist`);
9+
const indexHtmlPath = `${destPath}/index.html`;
10+
if (existsSync(indexHtmlPath)) {
11+
zip.addLocalFile(`${destPath}/index.html`);
12+
}
13+
zip.addLocalFile(`${destPath}/index.js`);
814
zip.addLocalFile(`${destPath}/manifest.json`);
915
return zip.writeZipPromise(assetPath);
1016
};

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ jobs:
3333
- name: ⏫ Upload Release Assets
3434
id: upload-release-asset
3535
uses: actions/github-script@v7
36-
env:
37-
ICON_RELEASE_ID: ${{ vars.ICON_RELEASE_ID }}
3836
with:
3937
result-encoding: json
4038
script: |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules
22
dist
33
.idea
4+
/packages/**/index.html
5+
/packages/**/index.js

package-lock.json

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"cross-spawn": "~7.0.5"
2929
},
3030
"devDependencies": {
31+
"@types/node": "^22.10.1",
3132
"npm-run-all": "4.1.5",
3233
"adm-zip": "^0.5.16"
3334
}

packages/auto-sync/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "auto-sync",
33
"id": "1443742630333209915",
44
"api": "1.0.0",
5-
"main": "dist/index.js",
6-
"ui": "dist/index.html",
5+
"main": "index.js",
6+
"ui": "index.html",
77
"capabilities": [],
88
"enableProposedApi": false,
99
"documentAccess": "dynamic-page",

packages/auto-sync/ui/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfig({
1010
assetsInlineLimit: 100000000,
1111
chunkSizeWarningLimit: 100000000,
1212
cssCodeSplit: false,
13-
outDir: "../dist",
13+
outDir: "../",
1414
rollupOptions: {
1515
output: {},
1616
},

packages/auto-sync/widget/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "Your Figma Plugin",
55
"scripts": {
6-
"build": "esbuild src/index.tsx --bundle --outfile=../dist/index.js --target=es6",
6+
"build": "esbuild src/index.tsx --bundle --outfile=../index.js --target=es6",
77
"lint": "eslint --ext .ts,.tsx --ignore-pattern node_modules .",
88
"lint:fix": "eslint --ext .ts,.tsx --ignore-pattern node_modules --fix .",
99
"dev": "npm run build -- --watch"

packages/codegen/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040
],
4141
"editorType": ["dev"],
42-
"main": "dist/index.js",
42+
"main": "index.js",
4343
"networkAccess": { "allowedDomains": ["none"] },
4444
"documentAccess": "dynamic-page"
4545
}

0 commit comments

Comments
 (0)