Skip to content

Commit

Permalink
chore: support windows for import wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeIlLeone committed Nov 21, 2024
1 parent 3f1c9a7 commit de8d146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/create-import-wrappers.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { writeFileSync } from "node:fs";
import { basename, join } from "node:path";
import { basename, posix } from "node:path";

type LocationsRegistry =
| string[]
Expand All @@ -19,7 +19,7 @@ const locations = {
function createWrappers(currentPath: string[], subpaths: LocationsRegistry): void {
if (Array.isArray(subpaths)) {
for (const subpath of subpaths) {
const fullPath = join(...currentPath, subpath);
const fullPath = posix.join(...currentPath, subpath);
const dtsContents = `export * from "./${fullPath}";`;
writeFileSync(`${basename(fullPath)}.d.ts`, dtsContents);
}
Expand Down

0 comments on commit de8d146

Please sign in to comment.