Skip to content

Commit fd8a7ce

Browse files
committed
Fix build process. GitHub Actions should now work.
1 parent b67869b commit fd8a7ce

File tree

9 files changed

+22
-20
lines changed

9 files changed

+22
-20
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ test/**/next-env.d.ts
2727
**/.idea
2828
**/.vscode
2929

30-
public
3130
build

jest.config.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
module.exports = {
22
preset: 'ts-jest',
33
testEnvironment: 'node',
4-
"modulePaths": [
5-
"<rootDir>"
6-
],
4+
globals: {
5+
'ts-jest': {
6+
diagnostics: {
7+
ignoreCodes: ["151001"]
8+
}
9+
}
10+
}
711
};

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"watch": "rollup -c -w",
99
"release": "rollup -c --environment INCLUDE_DEPS,BUILD:production",
1010
"postbuild": "purgecss -c purgecss.config.js -o public",
11-
"wp": "npx webpack --mode=development --watch",
11+
"wp": "webpack --mode=development --watch",
1212
"test": "jest",
1313
"coverage": "jest --coverage",
1414
"start": "sirv public"
@@ -25,9 +25,6 @@
2525
"tailwindcss": "^1.4.6"
2626
},
2727
"devDependencies": {
28-
"@babel/core": "^7.10.3",
29-
"@babel/preset-env": "^7.10.3",
30-
"@babel/preset-typescript": "^7.10.1",
3128
"@fullhuman/postcss-purgecss": "^2.3.0",
3229
"@rollup/plugin-commonjs": "^11.0.2",
3330
"@rollup/plugin-image": "^2.0.4",

parent

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

public/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Public Directory
2+
3+
This directory is empty for a reason: [Rollup](https://rollupjs.org/) needs it, else it fails. This is where the output will be.

src/flutter/make_container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const makeContainer = (
2424
const size = nodeWidthHeight(node, false);
2525
let propWidth = size.width ? `width: ${size.width}, ` : "";
2626
let propHeight = size.height ? `height: ${size.height}, ` : "";
27-
const propWidthHeight: string = `SizedBox(${propWidth}${propHeight})`;
27+
const propWidthHeight: string = `${propWidth}${propHeight}`;
2828

2929
if (node.fills !== figma.mixed && node.fills.length > 0) {
3030
let fill = node.fills[0];

src/flutter/make_material.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
AltFrameNode,
55
} from "../common/altMixins";
66
import { rgbaTohex, flutterColor } from "./flutter_helpers";
7-
import { getContainerSizeProp } from "./make_container";
7+
import { nodeWidthHeight } from "../common/nodeWidthHeight";
88

99
// https://api.flutter.dev/flutter/material/Material-class.html
1010
export const makeMaterial = (
@@ -61,7 +61,11 @@ export const makeMaterial = (
6161

6262
const material = `\nMaterial(${color}${elevation}${shadowColor}${shape}${clipContent}${padChild}),`;
6363

64-
const propWidthHeight: string = getContainerSizeProp(node);
64+
const size = nodeWidthHeight(node, false);
65+
let propWidth = size.width ? `width: ${size.width}, ` : "";
66+
let propHeight = size.height ? `height: ${size.height}, ` : "";
67+
const propWidthHeight: string = `${propWidth}${propHeight}`;
68+
6569
if (propWidthHeight) {
6670
return `SizedBox(${propWidthHeight}child: ${material}),`;
6771
}

src/tailwind/builderText.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class tailwindTextNodeBuilder extends tailwindDefaultBuilder {
9797
* example: font-extrabold
9898
* example: italic
9999
*/
100-
fontStyle = (node: AltTextNode): this => {
100+
fontStyle(node: AltTextNode): this {
101101
if (node.fontName !== figma.mixed) {
102102
const lowercaseStyle = node.fontName.style.toLowerCase();
103103

@@ -118,13 +118,13 @@ export class tailwindTextNodeBuilder extends tailwindDefaultBuilder {
118118
this.attributes += `font-${value} `;
119119
}
120120
return this;
121-
};
121+
}
122122

123123
/**
124124
* https://tailwindcss.com/docs/letter-spacing/
125125
* example: tracking-widest
126126
*/
127-
letterSpacing = (node: AltTextNode): this => {
127+
letterSpacing(node: AltTextNode): this {
128128
if (node.letterSpacing !== figma.mixed) {
129129
if (
130130
node.letterSpacing.unit === "PIXELS" &&
@@ -142,7 +142,7 @@ export class tailwindTextNodeBuilder extends tailwindDefaultBuilder {
142142
}
143143
}
144144
return this;
145-
};
145+
}
146146

147147
/**
148148
* https://tailwindcss.com/docs/line-height/

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"module": "es6",
55
"sourceMap": true,
66
"target": "es6",
7-
"moduleResolution": "node",
87
"typeRoots": ["./node_modules/@types", "./node_modules/@figma"]
98
}
109
}

0 commit comments

Comments
 (0)