Skip to content

Latest commit

 

History

History
95 lines (60 loc) · 3.69 KB

CONTRIBUTING.md

File metadata and controls

95 lines (60 loc) · 3.69 KB

Contributing to Cypress Documentation

Thanks for taking the time to contribute! 😄

Table of Contents

Code of Conduct

All contributors are expecting to abide by our Code of Conduct.

Getting Started

The documentation in this repo is generated using Hexo.

Fork this repository

Using GitHub, create a copy (a fork) of this repository under your personal account.

Clone your forked repository

git clone [email protected]:<your username>/cypress-documentation.git
cd cypress-documentation

Install dependencies:

note: at least Node 6 is required, but Node 8 with NPM v5 is preferred to take advantage of the package lock file.

npm install

This will install this repo's direct dependencies.

Then, build the public directory and start the app:

npm run build
npm start

Visit http://localhost:2222/.

note If you need to debug documentation build step run with environment variable set DEBUG=docs npm run build

Writing Documentation

Adding Examples

The documents outlining examples are within the source/examples directory. Each document is written in markdown with a little bit of Hexo flair. To add an example to a document, just try to follow the formatting of any previous examples in the markdown file.

Add an associating image with the example within the source/img/examples directory. Each image should be resolution 715w x 480h. Reference the image in the markdown document as follows:

{% img /img/examples/name-of-file.jpg "alt text describing img" %}

Commiting Code

Linting

Danger 📛: because we are minifying client side code using a Hexo plugin which in turn calls uglify, the code should be strictly ES5. Thus everything inside the theme should be linted with ES5 settings and not upgraded to ES6.

Pull Requests

You should push your local changes to your forked GitHub repository and then open a pull request from your repo to the cypress-io/cypress-documentation repo.

  • The pull request should be from your repository to the develop branch in cypress-io/cypress-documentation
  • When opening a PR for a specific issue already open, please use the address #[issue number] or closes #[issue number] syntax in the pull request description.

Contributor License Agreement

We use a cla-assistant.io web hook to make sure every contributor assigns the rights of their contribution to Cypress.io. If you want to read the CLA agreement, its text is in this gist.

After making a pull request, the CLA assistant will add a review comment. Just click on the link and accept the CLA. That's it!

Deployment

We will try to review and merge pull requests as fast as possible. After merging, we will deploy it to staging environment, run E2E tests (using Cypress itself of course), and then merge it into master, which will deploy it to the official https://docs.cypress.io website. If you want to know our deploy process, read DEPLOY.md.