File tree Expand file tree Collapse file tree 9 files changed +22
-20
lines changed Expand file tree Collapse file tree 9 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -27,5 +27,4 @@ test/**/next-env.d.ts
27
27
** /.idea
28
28
** /.vscode
29
29
30
- public
31
30
build
Original file line number Diff line number Diff line change 1
1
module . exports = {
2
2
preset : 'ts-jest' ,
3
3
testEnvironment : 'node' ,
4
- "modulePaths" : [
5
- "<rootDir>"
6
- ] ,
4
+ globals : {
5
+ 'ts-jest' : {
6
+ diagnostics : {
7
+ ignoreCodes : [ "151001" ]
8
+ }
9
+ }
10
+ }
7
11
} ;
Original file line number Diff line number Diff line change 8
8
"watch" : " rollup -c -w" ,
9
9
"release" : " rollup -c --environment INCLUDE_DEPS,BUILD:production" ,
10
10
"postbuild" : " purgecss -c purgecss.config.js -o public" ,
11
- "wp" : " npx webpack --mode=development --watch" ,
11
+ "wp" : " webpack --mode=development --watch" ,
12
12
"test" : " jest" ,
13
13
"coverage" : " jest --coverage" ,
14
14
"start" : " sirv public"
25
25
"tailwindcss" : " ^1.4.6"
26
26
},
27
27
"devDependencies" : {
28
- "@babel/core" : " ^7.10.3" ,
29
- "@babel/preset-env" : " ^7.10.3" ,
30
- "@babel/preset-typescript" : " ^7.10.1" ,
31
28
"@fullhuman/postcss-purgecss" : " ^2.3.0" ,
32
29
"@rollup/plugin-commonjs" : " ^11.0.2" ,
33
30
"@rollup/plugin-image" : " ^2.0.4" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export const makeContainer = (
24
24
const size = nodeWidthHeight ( node , false ) ;
25
25
let propWidth = size . width ? `width: ${ size . width } , ` : "" ;
26
26
let propHeight = size . height ? `height: ${ size . height } , ` : "" ;
27
- const propWidthHeight : string = `SizedBox( ${ propWidth } ${ propHeight } ) ` ;
27
+ const propWidthHeight : string = `${ propWidth } ${ propHeight } ` ;
28
28
29
29
if ( node . fills !== figma . mixed && node . fills . length > 0 ) {
30
30
let fill = node . fills [ 0 ] ;
Original file line number Diff line number Diff line change 4
4
AltFrameNode ,
5
5
} from "../common/altMixins" ;
6
6
import { rgbaTohex , flutterColor } from "./flutter_helpers" ;
7
- import { getContainerSizeProp } from "./make_container " ;
7
+ import { nodeWidthHeight } from "../common/nodeWidthHeight " ;
8
8
9
9
// https://api.flutter.dev/flutter/material/Material-class.html
10
10
export const makeMaterial = (
@@ -61,7 +61,11 @@ export const makeMaterial = (
61
61
62
62
const material = `\nMaterial(${ color } ${ elevation } ${ shadowColor } ${ shape } ${ clipContent } ${ padChild } ),` ;
63
63
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
+
65
69
if ( propWidthHeight ) {
66
70
return `SizedBox(${ propWidthHeight } child: ${ material } ),` ;
67
71
}
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export class tailwindTextNodeBuilder extends tailwindDefaultBuilder {
97
97
* example: font-extrabold
98
98
* example: italic
99
99
*/
100
- fontStyle = ( node : AltTextNode ) : this => {
100
+ fontStyle ( node : AltTextNode ) : this {
101
101
if ( node . fontName !== figma . mixed ) {
102
102
const lowercaseStyle = node . fontName . style . toLowerCase ( ) ;
103
103
@@ -118,13 +118,13 @@ export class tailwindTextNodeBuilder extends tailwindDefaultBuilder {
118
118
this . attributes += `font-${ value } ` ;
119
119
}
120
120
return this ;
121
- } ;
121
+ }
122
122
123
123
/**
124
124
* https://tailwindcss.com/docs/letter-spacing/
125
125
* example: tracking-widest
126
126
*/
127
- letterSpacing = ( node : AltTextNode ) : this => {
127
+ letterSpacing ( node : AltTextNode ) : this {
128
128
if ( node . letterSpacing !== figma . mixed ) {
129
129
if (
130
130
node . letterSpacing . unit === "PIXELS" &&
@@ -142,7 +142,7 @@ export class tailwindTextNodeBuilder extends tailwindDefaultBuilder {
142
142
}
143
143
}
144
144
return this ;
145
- } ;
145
+ }
146
146
147
147
/**
148
148
* https://tailwindcss.com/docs/line-height/
Original file line number Diff line number Diff line change 4
4
"module" : " es6" ,
5
5
"sourceMap" : true ,
6
6
"target" : " es6" ,
7
- "moduleResolution" : " node" ,
8
7
"typeRoots" : [" ./node_modules/@types" , " ./node_modules/@figma" ]
9
8
}
10
9
}
You can’t perform that action at this time.
0 commit comments