aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/anim-gen.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/anim-gen.ts')
-rw-r--r--src/routes/anim-gen.ts55
1 files changed, 24 insertions, 31 deletions
diff --git a/src/routes/anim-gen.ts b/src/routes/anim-gen.ts
index b91e088..67b1d6f 100644
--- a/src/routes/anim-gen.ts
+++ b/src/routes/anim-gen.ts
@@ -461,43 +461,36 @@ ${hiddenStageStyles}
margin-right: 100vw;
}
${ttyLines
- .flatMap((v) =>
- v.kind === 'text'
- ? [
- ...v.value.map((v) => ({
- kind: 'text' as const,
- ...v,
- })),
- ]
- : [],
- )
- .flatMap((v) => [
- ...(v.kind === 'text'
- ? [
- v.colour
- ? `.ttytext-block.text-\\[\\${v.colour}\\]{color:${v.colour};}`
- : '',
- v.bg ? `.ttytext-block.bg-\\[\\${v.bg}\\]{background:${v.bg};}` : '',
- ]
- : []),
- ])
- .filter((v, i, a) => v.length !== 0 && a.indexOf(v) === i)
- .join('\n')}
+ .flatMap((v) =>
+ v.kind === 'text'
+ ? [
+ ...v.value.map((v) => ({
+ kind: 'text' as const,
+ ...v,
+ })),
+ ]
+ : [],
+ )
+ .flatMap((v) => [
+ ...(v.kind === 'text'
+ ? [
+ v.colour
+ ? `.ttytext-block.text-\\[\\${v.colour}\\]{color:${v.colour};}`
+ : '',
+ v.bg ? `.ttytext-block.bg-\\[\\${v.bg}\\]{background:${v.bg};}` : '',
+ ]
+ : []),
+ ])
+ .filter((v, i, a) => v.length !== 0 && a.indexOf(v) === i)
+ .join('\n')}
`,
)
.join('')}
-${[...anim.exportToObject().values()]
- .map((v) => `#app.skip-animation ${v.selector}`)
- .join(',\n')} {
- animation-name: none;
- animation-duration: 0.01ms;
-}
`;
fs.writeFileSync(
'src/routes/anim.css',
`${comment}
-${
- esbuild.buildSync({
+${esbuild.buildSync({
stdin: {
contents: `${exported}
${tail}`,
@@ -506,7 +499,7 @@ ${tail}`,
write: false,
minify: false,
}).outputFiles![0].text
-}`,
+ }`,
);
fs.writeFileSync(
'src/routes/no-anim.css',