Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Commit 5023907

Browse files
committed
fix indentation
1 parent bdd3aae commit 5023907

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/buildFile.ts

+14-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,22 @@ return (
1010
`export const ${filename}Style = {
1111
${
1212
file.content instanceof Array ? (
13-
file.content.map((c: string) => {
14-
return ` ${camelCase(c)}: '${c}'\n`;
13+
file.content.map((c: string, index: number) => {
14+
const value: string = `${camelCase(c)}: '${c}'\n`;
15+
if (index === 0) {
16+
return `${value}`;
17+
} else {
18+
return ` ${value}`;
19+
}
1520
})
1621
) : (
17-
Object.keys(file.content).map((c: string) => {
18-
return ` ${camelCase(c)}: '${(<{[key: string]: string }>file.content)[c]}'\n`;
22+
Object.keys(file.content).map((c: string, index: number) => {
23+
const value: string = `${camelCase(c)}: '${(<{[key: string]: string }>file.content)[c]}'\n`;
24+
if (index === 0) {
25+
return `${value}`;
26+
} else {
27+
return ` ${value}`;
28+
}
1929
})
2030
)
2131
},

0 commit comments

Comments
 (0)