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

Normalize files paths #353

Closed
danilowoz opened this issue Feb 2, 2022 · 0 comments · Fixed by #595
Closed

Normalize files paths #353

danilowoz opened this issue Feb 2, 2022 · 0 comments · Fixed by #595
Labels
triage New issues that needs consideration

Comments

@danilowoz
Copy link
Member

danilowoz commented Feb 2, 2022

Tell us how you think we can improve Sandpack

Standardize and normalize the files paths provide by:

How would your idea work?

  • Add leading slash;
  • Remove leading dot (?);
  • Make sure it doesn't affect activePath and openPaths;

What are invalid and valid file paths you can pass to files object?

Valid:

  • "./";
  • "/foo.ts";
  • "/foo" no extension;
  • "foo.ts" no leading;

Invalid

  • "/"
  • "..."
  • "..fooo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New issues that needs consideration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant