jest-preview
jest-preview copied to clipboard
Convert `jest-preview` to monorepo using `pnpm workspace` and `Nx`
Is your feature request related to a problem? Please describe.
- Sometimes forgot to build transforms before running test/ demo
- Avoid the leak implementation of PostCSS via
postcss.config.js(parent traversal, seewebsite/postcss.config.jsandexamples/svelte/postcss.config.cjsfor more) - Better structure code base
- Leverage local caching feature of nx
- Leverage cloud caching feature of nx
Describe the solution you'd like
- [ ] Use
pnpminstead ofnpm - [ ] Use nx for speedup
- [ ] Ask Nx's folks if they can help reviewing the setup
- [ ] Extract current codebase to multiple packages
Describe how should jest-preview implements this feature
Separate to different packages
- src/ jest-preview
- cli
- demo
- examples (to link to
jest-previewin all examples) - tests (new ones, to contain e2e tests, for e.g:
sass < 1.45.0) - docs-e2e-testing
- website
Describe alternatives you've considered
Additional context
- Lerna is dead — Long Live Lerna
- Reference: https://github.com/strapi/strapi/pull/13664
TODO for @nvh95 Add other packages:
-
jest-preview-cssor@jest-preview/css -
jest-preview-fileor@jest-preview/file
They will be dependencies of jest-preview.
Reason: Keep jest-preview more focused on actually PREVIEWING functionality.
We can also consider adding a dedicated package test-preview-server (TODO: Think a better name, I think test-preview is fine) to support other frameworks than Jest in the future.