Skip to content

Commit

Permalink
Include license in dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Powell committed Jan 21, 2022
1 parent 27c32c1 commit 2c527ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions build-scripts/build-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ archive.pipe(output);
// archive.append(buffer3, { name: "file3.txt" });

// append a file
archive.file("LICENSE", { name: "LICENSE" });
archive.file("manifest.json", { name: "manifest.json" });
archive.file("dist/code.js", { name: "dist/code.js" });
archive.file("dist/ui.html", { name: "dist/ui.html" });
Expand Down
Binary file removed build-scripts/example.zip
Binary file not shown.
4 changes: 3 additions & 1 deletion src/figmaClasses/Page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export class Page {
xSortedNodes.sort((a, b) => a.x - b.x);
const leftmostChild = figma.getNodeById(xSortedNodes[0].id);

console.log("XSORT", leftmostChild);

const ySortedNodes = Page.copyChildren(pageNode.children); // Make a copy since sort() runs in place
ySortedNodes.sort((a, b) => b.y + b.height - (a.y + a.height));
const lowestChild = figma.getNodeById(ySortedNodes[0].id);
Expand All @@ -38,6 +40,7 @@ export class Page {
}

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

Expand Down

0 comments on commit 2c527ab

Please sign in to comment.