Skip to content

Commit 9089821

Browse files
committed
update README examples
1 parent cb3c6e8 commit 9089821

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

README.md

+19-6
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,26 @@ And then add the plugin's name to the list of build plugins in `netlify.yml` fil
2323

2424
### basic
2525

26+
Here is the most basic Netlify config file `netlify.yml` in YAML format with just Cypress plugin
27+
28+
```yaml
29+
plugins:
30+
# local Cypress plugin will test our site after it is built
31+
- package: netlify-plugin-cypress
32+
```
33+
34+
and its equivalent TOML format `netlify.toml`
35+
36+
```toml
37+
[[plugins]]
38+
package = "netlify-plugin-cypress"
39+
```
40+
41+
### recommended
42+
43+
We strongly recommend setting `CYPRESS_CACHE_FOLDER` to place the Cypress binary _inside the node_modules_ folder to [cache it between builds](https://on.cypress.io/caching)
44+
2645
```yaml
27-
# Netlify config file
2846
build:
2947
command: "npm run build"
3048
publish: "build"
@@ -132,11 +150,6 @@ Set environment variable `DEBUG=netlify-plugin-cypress` to see the debug logs. T
132150
variable <code>CYPRESS_CACHE_FOLDER = "./node_modules/CypressBinary"</code>.
133151
</details>
134152

135-
<details>
136-
<summary>Cypress binary is missing</summary>
137-
If you see error messages from `cypress` NPM module <code>Error: The cypress npm package is installed, but the Cypress binary is missing.</code> add to your repository <code>package.json</code> scripts <code>"postinstall": "cypress install"</code> command. See <a href="https://github.com/cypress-io/netlify-plugin-cypress-example/blob/master/package.json">netlify-plugin-cypress-example</a> for instance.
138-
</details>
139-
140153
<details>
141154
<summary>Several versions of Cypress are installed according to the build logs</summary>
142155
From the Netlify UI under Deploys, pick "Trigger Deploy" and select "Clear cache and deploy site". This should cleanly install new "node_modules" and remove old Cypress versions.

0 commit comments

Comments
 (0)