KaTeX / KaTeX/KaTeX

Restructure the repo as a mono-repo

Open
#1,411 6 comments 0 reactions 1 assignee Claimed by @ylemkimon View on GitHub
discussion
Dominant language
TypeScript
Stars
20.4k
Forks
1.3k
Avg merge
14h 37m
Merged PRs (30d)
7

Description

What might this look like:
- /
- /packages
- /packages/katex
- /packages/katex-auto-render
- /packages/katex-copy-tex
- /packages/katex-mathtex-script-type
- /packages/katex-define-font
- /devserver
- /website

Each of the folders within `packages` would have their own package.json file which would allow us to publish separate packages for `katex` itself as well as each of our extensions. Right now we bundle all of the extensions with each update to `katex` but the code in `contrib` hardly ever changes.

The `devserver` folder would have it's own package.json which would allow us to develop a more fully featured local testing app using React. Although it has it's own package.json we wouldn't publish this or `website` to npm.

Many of these packages will need to require each other as dependencies, e.g. `katex-define-font` would have `katex` as a dependency and `devserver` would require `katex` along with all the extension packages.

All of these dependencies can be managed relatively easily using yarn workspaces. The gist of workspaces is that all sub-package dependencies are hoisted into the root's node_modules folder. We've started doing this for a new project at Khan Academy and I've been quite pleased so far with the set up. See https://yarnpkg.com/lang/en/docs/workspaces/ for more details about yarn workspaces.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.