# CONTRIBUTING Contributions are always welcome, no matter how large or small. Before contributing, please read the [code of conduct](CODE_OF_CONDUCT.md). For details on contributing to documentation, see [Website Readme](https://github.com/decaporg/decap-website/blob/main/README.md). ## Setup > Install [Node.js (LTS)](https://nodejs.org/) on your system. ### Install dependencies ```sh git clone https://github.com/decaporg/decap-cms cd decap-cms npm install ``` ### Run locally ```sh npm run start ``` ## Available scripts ### clean Removes all of the CMS package `dist` directories. ```sh npm run clean ``` ### reset Runs the `clean` script and removes all the `node_modules` from the CMS packages. ```sh npm run reset ``` ### build Runs the `clean` script and builds the CMS packages. ```sh npm run build ``` ### build-preview Runs the `build` and `build-preview` scripts in each package and serves the resulting build locally. ```sh npm run build-preview ``` ### test Runs linting and Jest tests. ```sh npm run test ``` ### test:all Runs linting, Jest, and Cypress tests. ```sh npm run test:all ``` ### test:e2e Runs Cypress e2e tests. ```sh npm run test:e2e ``` ### test:e2e:dev Runs Cypress e2e tests on watch mode with an open instance of Chrome. ```sh npm run test:e2e:dev ``` ### format Formats code and docs according to our style guidelines. ```sh npm run format ``` ## Pull Requests We actively welcome your pull requests! If you need help with Git or our workflow, please ask in our [community chat](https://decapcms.org/chat). We want your contributions even if you're just learning Git. Our maintainers are happy to help! Decap CMS uses the [Forking Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) + [Feature Branches](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow). Additionally, PR's should be [rebased](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) on main when opened, and again before merging. 1. Fork the repo. 2. Create a branch from `main`. If you're addressing a specific issue, prefix your branch name with the issue number. 3. If you've added code that should be tested, add tests. 4. If you've changed APIs, update the documentation. 5. Run `npm run test` and ensure the test suite passes. 6. Use `npm run format` to format and lint your code. 7. PR's must be rebased before merge (feel free to ask for help). 8. PR should be reviewed by two maintainers prior to merging. ## Debugging `npm run start` spawns a development server and uses `dev-test/config.yml` and `dev-test/index.html` to serve the CMS. In order to debug a specific issue follow the next steps: 1. Replace `dev-test/config.yml` with the relevant `config.yml`. If you want to test the backend, make sure that the `backend` property of the config indicates which backend you use (GitHub, Gitlab, Bitbucket etc) and path to the repo. ```js backend: name: github repo: owner-name/repo-name ``` 2. Change the content of `dev-test/index.html` to: ```html