Dotfiles usefull in WordPress plugins and Themes development to configure development envinronment.
For themes use the theme.json file (delete it on plugin development)
- Configure the editor with EditorConfig
- Install phpcs and the rules WordPress Coding Standards
- Install and configure npm
- Or update npm to latest version with
$ npm update -g
- Execute
$ npm install
in the root of the directory to install the dependencies - For the Git flow we will use gitflow and work on the 'develop' branch
- To deploy this repository has been set up in Gitlab with CI/CD using the
.gitlab-ci.yml
file and to deploy the Staging server has been aliased deploy (it is created in the repo config file, in .git/); so if we run$ git deploy
the following sequence will run:
git push && git checkout main && git pull && git merge develop && git push && git checkout develop
- We send the current changes in the develop branch to the Git repo
- We're moving to the main branch
- We bring you the possible changes in the main branch (there should be no change)
- We merged the develop branch into the current main branch
- We send the current changes in the main branch to the Git repo (this is where the '.gitlab-ci.yml' action comes in and sends the changes via SFTP/FTP to the staging server)
- We are switching back to the develop branch to continue working on the development branch.