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

Support building and serving examples #457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pragmatrix
Copy link

This is a rudimentary attempt to support building, serving, and watching examples by simply forwarding the --example command line argument to cargo.

The implementation does not look up index.html in the examples/ directory (yet) but nevertheless can be useful even though index.html is loaded from the Cargo.toml manifest directory.

Closes #423

Checklist

  • Updated CHANGELOG.md describing pertinent changes.
  • Updated README.md with pertinent info (may not always apply).
  • Updated site content with pertinent info (may not always apply).
  • Squash down commits to one or two logical commits which clearly describe the work you've done. If you don't, then Dodd will 🤓.

@github-actions
Copy link

github-actions bot commented Oct 8, 2023

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Oct 8, 2023
@github-actions
Copy link

This PR was closed because it has been stalled for 10 days with no activity.

@ctron
Copy link
Collaborator

ctron commented Dec 12, 2023

@pragmatrix I would love to have this too for some of my projects :) I assume the idea is to run trunk serve --example foo and have trunk serve the examples/foo/main.rs, right?

Maybe it makes sense to add a few todo's in the initial comment of the PR, like the detection of the index.html file. Like that:

  • pass --example to build
  • detect index.html in example folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can trunk serve examples?
2 participants