Skip to content

Commit

Permalink
bug: on Windows path with back slash removed after formatting with pr…
Browse files Browse the repository at this point in the history
…ettier (#546)
  • Loading branch information
dineshduggal authored Jan 31, 2024
1 parent 526fc04 commit 37f2ba7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/react-native/scripts/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ function generate({ configPath, absolute = false, useJs = false }) {
workingDir: cwd,
});

// TODO refactor contexts and normalized stories to be one thing
const normalizedStories = storiesSpecifiers.map((specifier) => {
// TODO why????
const reg = globToRegexp(`./${specifier.files}`);

const { path: p, recursive: r, match: m } = toRequireContext(specifier);

const pathToStory = ensureRelativePathHasDot(path.relative(configPath, p));
const pathToStory = ensureRelativePathHasDot(path.posix.relative(configPath, p));
return `{
titlePrefix: "${specifier.titlePrefix}",
directory: "${specifier.directory}",
Expand Down

0 comments on commit 37f2ba7

Please sign in to comment.