Skip to content

Windows-fix: use path instead of / for handling paths - #1754

Merged
gvc merged 4 commits into
mainfrom
windows-fix
May 23, 2023
Merged

gvc merged 4 commits into
mainfrom
windows-fix

Conversation

@gvc

@gvc gvc commented May 10, 2023 •

Copy link
Copy Markdown
Contributor

What's the purpose of this pull request?

To ensure that our starter works on Windows computers.

How it works?

I've had to do two different things. One was to use the path library to manipulate filenames and paths, instead of directly using /. The other was to explicitly add the node_modules to the SASS load path, so our library can use

How to test it?

Find a windows machine, fork the starter, use this PR's version of faststore/core and faststore/cli and run it. It should work just fine.

"@faststore/core": "https://pkg.csb.dev/vtex/faststore/commit/c66c0743/@faststore/core",
....
"@faststore/cli": "https://pkg.csb.dev/vtex/faststore/commit/c66c0743/@faststore/cli",

You can use the starter PR and test de scripts locally as mentioned in starter PR.

Starters Deploy Preview

vtex-sites/starter.store#56

References

NA

@vercel

vercel Bot commented May 10, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
faststore-site ⬜️ Ignored (Inspect) Visit Preview May 17, 2023 1:40am

@codesandbox-ci

codesandbox-ci Bot commented May 10, 2023 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3fcd07f:

Sandbox Source
Store UI Typescript Configuration

@gvc
gvc marked this pull request as ready for review May 12, 2023 13:29
@gvc
gvc requested a review from a team as a code owner May 12, 2023 13:29
@gvc
gvc requested review from lariciamota and lucasfp13 and removed request for a team May 12, 2023 13:29
@gvc gvc changed the title Use path instead of / for handling paths Windows-fix: use path instead of / for handling paths May 12, 2023

@eduardoformiga eduardoformiga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! ✨
I Noticed that we aren't using the path in other functions (import and others from fs-extra) that use the directories, looks like it wasn't need.

@ArthurTriis1 ArthurTriis1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! But i couldn't test in a windows PC

@gvc
gvc merged commit 6935b8f into main May 23, 2023
@gvc
gvc deleted the windows-fix branch May 23, 2023 17:30
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.

3 participants