Skip to content

Commit 393a8ca

Browse files
author
Barthélémy Ledoux
authored
fix: add missing script for building wizard (#15502)
* fix: add missing script for building wizard * docs: readme needs componentFolder * fix: make build script work on windows
1 parent a72eceb commit 393a8ca

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

npm/create-cypress-tests/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"private": false,
66
"main": "index.js",
77
"scripts": {
8-
"build": "yarn prepare-example && tsc -p ./tsconfig.json && chmod +x dist/src/index.js && node scripts/example copy-to ./dist/initial-template && copy src/**/*.template.js dist/src",
8+
"build": "yarn prepare-example && tsc -p ./tsconfig.json && node scripts/example copy-to ./dist/initial-template && yarn copy \"./src/**/*.template.js\" \"./dist/src\"",
9+
"build-prod": "yarn build",
910
"prepare-example": "node scripts/example copy-to ./initial-template",
1011
"test": "cross-env TS_NODE_PROJECT=./tsconfig.test.json mocha --config .mocharc.json './src/**/*.test.ts'",
1112
"test:watch": "yarn test -w"

npm/react/README.md

+4-11
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,12 @@ npm install --save-dev cypress @cypress/react
6969
You can use our command line wizard to give you instructions on configuring this plugin. It will try to determine which framework or bundling tool you are using and give you instructions on right configuration.
7070

7171
```sh
72-
@cypress/react init
72+
npx create-cypress-tests --component-testing
7373
```
7474

75-
Or continue with manual installation:
75+
Or continue with manual installation in the plugin file
7676

77-
1. Include this plugin from your project's `cypress/support/index.js`
78-
79-
```js
80-
require('@cypress/react/support')
81-
```
82-
83-
2. Tell Cypress how your React application is transpiled or bundled (using Webpack), so Cypress can load your components. For example, if you use `react-scripts` (even after ejecting) do:
77+
1. Tell Cypress how your React application is transpiled or bundled (using Webpack), so Cypress can load your components. For example, if you use `react-scripts` (even after ejecting) do:
8478

8579
```js
8680
// cypress/plugins/index.js
@@ -94,11 +88,10 @@ module.exports = (on, config) => {
9488

9589
See [Recipes](./docs/recipes.md) for more examples.
9690

97-
3. ⚠️ Turn the experimental component support on in your `cypress.json`. You can also specify where component spec files are located. For example, to have them located in `src` folder use:
91+
2. You can specify where component spec files are located. For example, to have them located in `src` folder use:
9892

9993
```json
10094
{
101-
"experimentalComponentTesting": true,
10295
"componentFolder": "src"
10396
}
10497
```

0 commit comments

Comments
 (0)