jest-preview icon indicating copy to clipboard operation
jest-preview copied to clipboard

Convert `jest-preview` to monorepo using `pnpm workspace` and `Nx`

Open nvh95 opened this issue 3 years ago • 1 comments

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, see website/postcss.config.js and examples/svelte/postcss.config.cjs for more)
  • Better structure code base
  • Leverage local caching feature of nx
  • Leverage cloud caching feature of nx

Describe the solution you'd like

  • [ ] Use pnpm instead of npm
  • [ ] 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-preview in 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

nvh95 avatar Jul 03 '22 10:07 nvh95

TODO for @nvh95 Add other packages:

  • jest-preview-css or @jest-preview/css
  • jest-preview-file or @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.

nvh95 avatar Aug 18 '22 04:08 nvh95