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 package.json to static .well-known by default #405

Merged
merged 98 commits into from
Sep 26, 2023
Merged

Conversation

ryanatkn
Copy link
Owner

@ryanatkn ryanatkn commented Sep 23, 2023

Adds new default behavior. The package.json is included in the static directory during vite build (non-destructively), so it gets deployed as ${base}/.well-known/package.json. The docs include more details.

It's nonstandard, couldn't find prior art, but I'm going to use the functionality it provides starting with @fuz.dev/fuz-docs. With Webfinger being used by ActivityPub/Fediverse and Node being the target for Deno and Bun, this seems like the obvious choice. See Wikipedia - https://en.wikipedia.org/wiki/Well-known_URIs

The usecase for the fuz-docs is to be able to populate that project with data via a list of hosts. I want the source of truth for fuz-docs to be the git repo contents of each individual project that it references, and have fuz-docs just be built and deployed to the static website on demand. The goal is to have the config be as simple as possible, just a list of hosts to begin with.

This would make a good API for users, too, because hosts are easy to define and move around, and anyone could mix and match libraries and publish their docs/etc.

I'm sure some of this will change, I'm just trying to enable some usecases for data/module sharing across many projects using HTTP and not git.

@@ -0,0 +1,5 @@
---
Copy link
Owner Author

Choose a reason for hiding this comment

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

good bot, well-named

@ryanatkn ryanatkn merged commit 5972c30 into main Sep 26, 2023
1 check failed
@ryanatkn ryanatkn deleted the well-known-pkg branch September 26, 2023 04:01
The `gro exports` task, which is called during the dev and build tasks,
performs two separate steps that both call `package_json` to determine their behavior:

- when `when === 'updating_exports'`, Gro is updating the repo's `package.json` `"exports"` property
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I'm being lazy and not opening a fork, but might I suggest:
"with `when...." just to avoid the double when.

Copy link
Owner Author

@ryanatkn ryanatkn Sep 27, 2023

Choose a reason for hiding this comment

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

good note thank you, did that and some other clarifications here - 8a257a9

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.

2 participants