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

[chore] Separate website/elements/apps from library? #434

Open
LeaVerou opened this issue Feb 13, 2024 · 9 comments
Open

[chore] Separate website/elements/apps from library? #434

LeaVerou opened this issue Feb 13, 2024 · 9 comments

Comments

@LeaVerou
Copy link
Member

LeaVerou commented Feb 13, 2024

The current structure has served us well but we're at the point where we need to separate the two.

In terms of tests, presumably the JS tests will stay with the library, while the HTML tests (old and new) will live with the website.

Both will still deploy to the web, I’m thinking dev.colorjs.io for the library repo.

@LeaVerou
Copy link
Member Author

Where would the API docs live? Presumably they need access to the source, but perhaps that can be done by installing color.js as an npm package on the website repo and pointing typedoc to that?

@MysteryBlokHed
Copy link
Member

Where would the API docs live? Presumably they need access to the source, but perhaps that can be done by installing color.js as an npm package on the website repo and pointing typedoc to that?

That should work if we want to keep all website stuff together. Alternatively there could also be a Git submodule that links back to this repo, but that might be overcomplicating things.

@LeaVerou
Copy link
Member Author

Yeah, my opinion on this is that submodules are plague and must be avoided at all costs 😛

@LeaVerou LeaVerou changed the title [chore] Separate website from library [chore] Separate website/elements/apps from library? Apr 22, 2024
@LeaVerou
Copy link
Member Author

I’ve been thinking about this and I think it makes sense to also separate apps and elements into separate repos / separate npm packages / separate subdomains.

Especially as I plan a bit of a revamp of these, what do you think about separating them?
We could create an npm namespace and publish them as @colorjs/apps and @colorjs/elements.
Later down the line we may even want to separate elements into separate packages, but let’s cross that bridge when we get to it.

@LeaVerou
Copy link
Member Author

LeaVerou commented Jun 1, 2024

As an update, I have split elements and apps into their own repos and websites (https://apps.colorjs.io and https://elements.colorjs.io respectively). The website will be harder to split out though…

@LeaVerou
Copy link
Member Author

LeaVerou commented Oct 1, 2024

Ok, thinking about this some more, I have a plan:

  • We split into two repos: core (which we can deploy, e.g. to dev.colorjs.io) and colorjs.io (names TBB, suggestions welcome)
  • core will contain src, types, scripts, CONTRIBUTING.md, .editorconfig, ESLint config, tsconfig, LICENSE, README.md
  • colorjs.io will contain: Notebook, 11ty files, assets, get/
  • Unsure: benchmarks, Typedoc, tests, test

We will install colorjs.io via npm to the website repo (we can use npm link for local testing). We can also install the repo itself, so we can try stuff with the latest commit, or even older versions too.

Thoughts?

@MysteryBlokHed
Copy link
Member

I think it'd be ideal to have tests/benchmarks alongside the source code, but I'm not sure how practical it'd be to host them on the website if we do that. If there's an easy way to set up the website to use content from multiple repositories (besides Git submodules which we've decided against), then I'd opt for putting those directories with the source code. Otherwise I'd say they should go with the rest of the website content.

@LeaVerou
Copy link
Member Author

Depends on what you mean by "the website". We can easily deploy the code repo to a separate subdomain (e.g. dev.colorjs.io)

@MysteryBlokHed
Copy link
Member

That'd be the best way to do it then imo

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

No branches or pull requests

2 participants