Skip to content

Commit

Permalink
Address dirname suggestion in internal codegen script (#1947)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniGuardiola authored Mar 1, 2024
1 parent 1b945cf commit 864f915
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// requires Bun installed globally: bun.sh

import path from "node:path";
import { fileURLToPath } from "node:url";
import { readPackageUp } from "read-package-up";
import { introspectTailwindConfig } from "./introspect.js";
import { type SortConfig, sortConfigFromSpec } from "./sort-config.js";
Expand Down Expand Up @@ -58,7 +59,7 @@ function generateFile(sortConfig: SortConfig) {
}

async function findRoot() {
let nextPath = import.meta.dir;
let nextPath = path.dirname(fileURLToPath(import.meta.url));
let rootPath: string | false = false;
while (!rootPath) {
const pkg = await readPackageUp({ cwd: nextPath });
Expand Down

0 comments on commit 864f915

Please sign in to comment.