Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace separators in paths for Windows users #59

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

Pavel-Tyan
Copy link
Contributor

@Pavel-Tyan Pavel-Tyan commented Jul 10, 2024

Windows paths contain '\' separator. Replace '\' to '/' because includer.js doesn't work correctly with '\' separator in path.

@@ -6,7 +6,7 @@ const IN_PATH = path.resolve('src', 'includer');
const OUT_PATH = 'includer';
const FORMATS = ['cjs', 'esm'];

const tsFiles = glob.sync(`${IN_PATH}/**/*.ts`);
const tsFiles = glob.sync(`${IN_PATH.replace(/\\/g, '/')}/**/*.ts`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems it would be better if you add a replacement when defining a variable

const IN_PATH = path.resolve('src', 'includer').replace(/\\/g, '/');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and commit tag should be probably fix:

add separator replacement when defining IN_PATH variable
@martyanovandrey martyanovandrey merged commit f2490f0 into diplodoc-platform:master Jul 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants