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

Add template of Cloudflare Pages #51

Closed
syumai opened this issue Apr 30, 2023 · 4 comments
Closed

Add template of Cloudflare Pages #51

syumai opened this issue Apr 30, 2023 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@syumai
Copy link
Owner

syumai commented Apr 30, 2023

@syumai syumai added the enhancement New feature or request label Apr 30, 2023
@syumai
Copy link
Owner Author

syumai commented Apr 30, 2023

#50 has been done.

A template based on pages-function example is wanted.

@syumai syumai added help wanted Extra attention is needed good first issue Good for newcomers and removed enhancement New feature or request labels Apr 30, 2023
@AdjectiveAllison
Copy link
Contributor

AdjectiveAllison commented May 26, 2023

I'd love to do this but I'm unsure what the best approach would be to create a template.

Would it just be some manual file movement/changes into the templates directory? The Makefile would need to be updated to use the direct path to the asset gen and maybe something in wrangler.toml needs to be changed?

Could I help write something that moves your examples to templates automatically perhaps?
I'm looking to help contribute and am really glad I found this exists. Let me know if there is any issue that you'd like me to tackle first.

@syumai
Copy link
Owner Author

syumai commented May 26, 2023

@AdjectiveAllison

Thank you for expressing your willingness to contribute.

For this task, there is no need to modify the core code of syumai/workers.
The following tasks are expected:

  • Create _templates/cloudflare/pages-tinygo
  • Move the contents of _examples/pages-functions to the above directory and simplify the content
    • For example, we would like to remove specific terms like syumai in /api/hello?name=syumai.
  • Adjust wrangler.toml, Makefile and README.md to have similar content as worker-tinygo
    • We want it to work with the command wrangler generate my-app syumai/workers/_templates/cloudflare/pages-tinygo
    • Although the wrangler generate command has been deprecated in wrangler v3, there is no alternative yet, so it is still acceptable to continue using it.

If you can handle these changes, it would be greatly appreciated. Thank you for your comment.

@syumai
Copy link
Owner Author

syumai commented Jun 1, 2023

#62 resolved this issue.

@syumai syumai closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants