Skip to content

Commit 2c527ab

Browse files
author
Kevin Powell
committed
Include license in dev build
1 parent 27c32c1 commit 2c527ab

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

build-scripts/build-dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ archive.pipe(output);
5757
// archive.append(buffer3, { name: "file3.txt" });
5858

5959
// append a file
60+
archive.file("LICENSE", { name: "LICENSE" });
6061
archive.file("manifest.json", { name: "manifest.json" });
6162
archive.file("dist/code.js", { name: "dist/code.js" });
6263
archive.file("dist/ui.html", { name: "dist/ui.html" });

build-scripts/example.zip

-43.4 KB
Binary file not shown.

src/figmaClasses/Page.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export class Page {
2525
xSortedNodes.sort((a, b) => a.x - b.x);
2626
const leftmostChild = figma.getNodeById(xSortedNodes[0].id);
2727

28+
console.log("XSORT", leftmostChild);
29+
2830
const ySortedNodes = Page.copyChildren(pageNode.children); // Make a copy since sort() runs in place
2931
ySortedNodes.sort((a, b) => b.y + b.height - (a.y + a.height));
3032
const lowestChild = figma.getNodeById(ySortedNodes[0].id);
@@ -38,6 +40,7 @@ export class Page {
3840
}
3941

4042
static createTestsGroupFrame(pageNode) {
43+
const nextAvailableCoordinates = this.getNextAvailableCoordinates(pageNode); // run this before appending the test wrapper, otherwise its coordinates of 0,0 may take precedence
4144
const testsGroupFrame = figma.createFrame();
4245
if (pageNode !== figma.currentPage) {
4346
pageNode.appendChild(pageNode);
@@ -54,7 +57,6 @@ export class Page {
5457
testsGroupFrame.paddingTop = 0;
5558
testsGroupFrame.paddingBottom = 0;
5659
testsGroupFrame.fills = [];
57-
const nextAvailableCoordinates = this.getNextAvailableCoordinates(pageNode);
5860
testsGroupFrame.x = nextAvailableCoordinates.x;
5961
testsGroupFrame.y = nextAvailableCoordinates.y;
6062

0 commit comments

Comments
 (0)