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

Add `vitest-preview setup` CLI

Open nvh95 opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

When integrating vitest-preview, beside installing pnpm add -D vitest-preview, users need to do some other things like:

  • Set vitest config css: !process.env.CI
  • Setup global CSS
  • Add vitest-preview to package.json's scripts
  • ~~Update .gitignore~~
  • Add debug() to a test file

Describe the solution you'd like

  • Add a new CLI vitest-preview setup
  • Update the docs to recommend new approach

Describe how should we implement this feature

Consider https://github.com/nvh95/jest-preview/blob/61648e16e455f4eb561c267c9f7d897c953e6dcb/cli/index.js

Additional context

People usually integrate vitest-preview by running pnpm add -D vitest-preview and it's very easy for them to forget to config a thing.

nvh95 avatar Oct 25 '22 08:10 nvh95

In #54, we added

vitest-preview setup automatic-mode

nvh95 avatar Sep 28 '25 16:09 nvh95