dai-shi / waku

⛩️ The minimal React framework
https://waku.gg
MIT License
4.11k stars 108 forks source link

fix (create-waku): example GitHub urls can contain `www` too #721

Closed Rec0iL99 closed 1 month ago

Rec0iL99 commented 1 month ago

Current Behaviour:

pnpm start --example https://www.github.com/dai-shi/waku/tree/main/examples/02_template_js                                                                                                                 

> create-waku@0.9.2-alpha.0 start /Users/joelmathew/WebProjects/waku-dev/waku/packages/create-waku
> node ./dist/index.js "--example" "https://www.github.com/dai-shi/waku/tree/main/examples/02_template_js"

Invalid URL: "https://www.github.com/dai-shi/waku/tree/main/examples/02_template_js". Only GitHub repositories are supported. Please use a GitHub URL and try again.

The url is a valid GitHub url which should be accepted by the create-waku utility. This pr should fix this behaviour.

vercel[bot] commented 1 month ago

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

1 Ignored Deployment | Name | Status | Preview | Updated (UTC) | | :--- | :----- | :------ | :------ | | **waku** | ⬜️ Ignored ([Inspect](https://vercel.com/daishis-projects/waku/9VUQEYjTXFCbcmB4ZZ2Ge9QbKpdi)) | [Visit Preview](https://waku-git-fork-rec0il99-github-origin-bug-daishis-projects.vercel.app) | May 26, 2024 4:18am |
codesandbox-ci[bot] commented 1 month ago

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.

Rec0iL99 commented 1 month ago

Hi @dai-shi, I think most browsers automatically add www to urls if the user forgets to add it for better ux.

https://github.com/dai-shi/waku/tree/main/examples/02_template_js https://www.github.com/dai-shi/waku/tree/main/examples/02_template_js

Both the above URLs resolve to the link except one has www and the other doesn't.

Rec0iL99 commented 4 weeks ago

Just tried appending www to the url out of curiosity and the CLI failed. Thanks for merging 👍