Skip to content

Commit

Permalink
fix: use entry instead of kind
Browse files Browse the repository at this point in the history
  • Loading branch information
nyarthan committed Feb 27, 2024
1 parent 3fcbcef commit 72fc302
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/css2tailwind/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as path from 'node:path';
import type { CssInJs } from 'postcss-js';

import { compileStyleSheet } from './compiler';
import type { Kind } from './util';

export async function readStyles(dir: string): Promise<string[]> {
const entries = await fsp.readdir(dir);
Expand All @@ -21,7 +20,7 @@ export async function parseStyles(dir: string): Promise<CssInJs> {
}, {});
}

export async function writeStyles(dir: string, kind: Kind, style: CssInJs) {
export async function writeStyles(dir: string, entry: string, style: CssInJs) {
await fsp.mkdir(dir, { recursive: true });
return fsp.writeFile(path.join(dir, `${kind}.json`), JSON.stringify(style));
return fsp.writeFile(path.join(dir, `${entry}.json`), JSON.stringify(style));
}

0 comments on commit 72fc302

Please sign in to comment.