Skip to content

Commit ebc8fc1

Browse files
committed
refactor(init): remove css()
1 parent b4fd717 commit ebc8fc1

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

init/src/init.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,6 @@ export const enum InitStep {
1515
Docker = "Docker",
1616
}
1717

18-
function css(strs: TemplateStringsArray, ...exprs: string[]): string {
19-
let out = "";
20-
21-
for (let i = 0; i < exprs.length; i++) {
22-
out += strs[i];
23-
out += String(exprs[i]);
24-
}
25-
out += strs.at(-1) ?? "";
26-
27-
return out;
28-
}
29-
3018
export class InitError extends Error {}
3119

3220
function error(tty: MockTTY, message: string): never {
@@ -215,7 +203,7 @@ export default {
215203
await writeFile("tailwind.config.ts", TAILWIND_CONFIG_TS);
216204
}
217205

218-
const GRADIENT_CSS = css`.fresh-gradient {
206+
const GRADIENT_CSS = `.fresh-gradient {
219207
background-color: rgb(134, 239, 172);
220208
background-image: linear-gradient(
221209
to right bottom,
@@ -225,7 +213,7 @@ export default {
225213
);
226214
}`;
227215

228-
const NO_TAILWIND_STYLES = css`*,
216+
const NO_TAILWIND_STYLES = `*,
229217
*::before,
230218
*::after {
231219
box-sizing: border-box;
@@ -375,7 +363,7 @@ html {
375363
376364
${GRADIENT_CSS}`;
377365

378-
const TAILWIND_CSS = css`@tailwind base;
366+
const TAILWIND_CSS = `@tailwind base;
379367
@tailwind components;
380368
@tailwind utilities;
381369
${GRADIENT_CSS}`;

0 commit comments

Comments
 (0)