You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Installing Cypress guide improvment
closes#200, closes#218 and closescypress-io/cypress#866
* npm install section clarification
- what is the npm package
- best practice highlighted
* direct download section precisions
- what is exactly downloaded as the user didn't knew it exactly
* new CDN Structure section
- CDN url pattern
- it give to the user enough informations to download Cypress in the wanted
version for the wanted platform (could download a linux Cypress version from
a windows workstation)
- example
* Advanced section
- warning added about CLI output when running cypress
* updates to new advanced instructions
- Some wording changes
- Moved CDN section into section called ‘Hosting’ within the Advanced
install instructions.
- Added the download table (we only want to expose our
download.cypress.io endpoint, not the cdn directly)
- update platforms to correct os names.
Copy file name to clipboardexpand all lines: source/guides/getting-started/installing-cypress.md
+45-4
Original file line number
Diff line number
Diff line change
@@ -34,16 +34,27 @@ cd /your/project/path
34
34
npm install cypress --save-dev
35
35
```
36
36
37
-
This will install Cypress locally as a dev dependency for your project. We recommend this approach because:
37
+
This will install Cypress locally as a dev dependency for your project.
38
+
39
+
{% img /img/guides/installing-cli.gif %}
40
+
41
+
{% note info %}
42
+
Notice that the Cypress `npm` package is a wrapper around the Cypress binary. The version of the `npm` package determines the version of the binary downloaded.
43
+
{% endnote %}
44
+
45
+
{% note success Best Practice %}
46
+
47
+
The recommended approach is to install Cypress with `npm` because :
38
48
39
49
- Cypress is versioned like any other dependency.
40
50
- It simplifies running Cypress in {% url 'Continuous Integration' continuous-integration %}.
41
-
42
-
{% img /img/guides/installing-cli.gif %}
51
+
{% endnote %}
43
52
44
53
## {% fa fa-download %} Direct Download
45
54
46
-
If you're not using `node` or `npm` in your project or you just want to try Cypress out quickly, you can always {% url "download Cypress directly here" http://download.cypress.io/desktop %}.
55
+
If you're not using `node` or `npm` in your project or you just want to try Cypress out quickly, you can always {% url "download Cypress directly from our CDN" http://download.cypress.io/desktop %}.
56
+
57
+
The direct download will always grab the latest available version. Your platform will be detected automatically.
47
58
48
59
Just manually unzip and double click. Cypress will run without needing to install any dependencies.
49
60
@@ -111,6 +122,8 @@ You can {% url 'read more about the CLI here' command-line %}.
111
122
112
123
# Advanced
113
124
125
+
## Environment Variables
126
+
114
127
Using an environment variable you can control how Cypress is installed.
115
128
116
129
This is helpful if you want to:
@@ -142,3 +155,31 @@ To override what is installed, you simply set `CYPRESS_BINARY_VERSION` with the
142
155
```
143
156
144
157
In all cases, the fact that the binary was installed from a custom location *is not saved*in your `package.json` file. Every repeated installation would have to use the same environment variable to install the same binary.
158
+
159
+
{% note warning Note %}
160
+
Setting the `CYPRESS_BINARY_VERSION` to a URL or local path will always display a warning message when opening. This is normal as the Cypress CLI cannot match the binary version with the `npm` package version.
161
+
{% endnote %}
162
+
163
+
## Hosting
164
+
165
+
If you want to download a specific Cypress version for a given platform, you can get it from our CDN.
166
+
167
+
You may want to do this if you want to host Cypress yourself and serve it from a local network.
168
+
169
+
The download server url is `https://download.cypress.io`.
170
+
171
+
Method | Url | Description
172
+
------ | --- | -----------
173
+
`GET`|`/desktop `| Download latest desktop app
174
+
`GET`|`/desktop?platform=p `| downloads latest desktop app for specific platform
0 commit comments