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

Port to JSON, rework TypeScript types #2

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Port to JSON, rework TypeScript types #2

wants to merge 10 commits into from

Conversation

edemaine
Copy link

@edemaine edemaine commented Jun 24, 2022

First, cleaning up types before porting data over. This aims to make types (and lists of type values) easy to consume e.g. in solid-site.

  • Replace enums with arrays (for easy enumeration in JS plus automatic types)
  • Split Resource vs. Package (Ecosystem for the union). Are we happy with this terminology? (It matches solid-site's current notation.)
  • Drop "library" option for Packages. We discussed this a long time ago; I don't think there's a useful distinction between "package" and "library". (I could still see calling the merged type "software"...)
  • Switch from Unix timestamps to ISO date times
  • Rename ResourceCategories into Categories.
  • ?? Should we split Categories into PackageCategories and ResourceCategories? It looks like Educational is the one and only one used by resources. It's also used in one package, so I guess it could be listed twice...
  • Add annotations and script for generating JSON schema! yarn build:schema generates schema.json.

Second, restructure to use individual JSON files in data. dist is no longer in the repo but is still in the JSON export. Many more scripts.

@edemaine edemaine changed the title Replace enums with objects + types, split resource vs. package Rework TypeScript types Jun 24, 2022
@edemaine edemaine changed the title Rework TypeScript types Port to JSON, rework TypeScript types Jun 24, 2022
@davedbase
Copy link
Member

This looks very reasonable. To answer some of the Qs:

Split Resource vs. Package (Ecosystem for the union). Are we happy with this terminology? (It matches solid-site's current notation.)

I think it makes sense. Resource being an article, video or podcast. Package encapsulates installable utilities, plug-ins etc. It doesn't capture other broader ecosystem support though ie. Preview.js or similar tooling that isn't really a package. It's rare so perhaps not important enough to separate?

?? Should we split Categories into PackageCategories and ResourceCategories? It looks like Educational is the one and only one used by resources. It's also used in one package, so I guess it could be listed twice...

I think separating the makes sense because the taxonomy is distinctly different between Resource and Package. While there are some overlaps I don't think that's a reason to conflate them.

The rest looks great, perhaps we should update with the latest list from the website and push this into production.

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