mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-02 21:10:47 -05:00
f920dcbd0d
* chore: enforce 'no-implicit-dependencies' on tslint * downgrade chalk version for errors package
@packages/scaffold-config
Logic related to scaffolding new projects using launchpad, including detecting component frameworks and bundlers, installing dependencies and creating cypress.config.js files.
We have integrations for popular code generators like Next.js and Vue CLI, and ship a cypress.config.js that will work out of the box for those templates.
We will also attempt to scaffold a configuration file for projects using React and Vue projects using Vite and Webpack that are not necessarily created using a code generator.
Supported Frameworks and Libraries
| Name | Version | Dev Server | Version | Library | Component Adaptor | Example Project |
|---|---|---|---|---|---|---|
| React | - | Vite | 4, 5 | React 18, 19 | @cypress/react@latest |
Link |
| React | - | Webpack | 4, 5 | React 18, 19 | @cypress/vue@latest |
Link |
| Vue | - | Vite | 4, 5, 6 | Vue 3 | @cypress/react@latest |
Link |
| Vue | - | Webpack | 4, 5 | Vue 3 | @cypress/vue@latest |
Link |
| Angular | - | Webpack | 5 | Angular 17, 18, 19 | @cypress/angular@latest |
Link |
| Svelte | - | Vite | 4, 5, 6 | Svelte 5 | @cypress/svelte@latest |
Link |
| Svelte | - | Webpack | 4, 5 | Svelte 5 | @cypress/svelte@latest |
Link |
| Next.js | 14, 15 | Webpack | 4, 5 | React 18, 19 | @cypress/react@latest |
Link |
Adding More Projects
The process for adding a new library/framework/bundler is as follows:
- Add your framework in
src/frameworks.ts. - Any new dependencies are declared in
src/constants.ts. Don't forget to add a description. - Ensure your project has the correct library and bundler detected with a test in
test/unit/detect.spec.ts. - Add a new project with the correct
cypress.config.jsandpackage.jsonto system-tests/projects. It should be<name>-configured, which is a working example with some specs. Ensure it will run on CI by adding it tocomponent_testing_spec.ts. - Add another project called
<name>-unconfigured, which represents the project prior to having Cypress added. This will be used in step 5. - Add a test to
scaffold-component-testing.cy.tsto ensure your project has the correctcypress.config.jsgenerated. Use an existing test as a template.