GitHub is a great resource for keeping a master copy of code projects. With the need for efficient remote-work options for developers, we have started moving towards a GitHub-centered workflow. GitHub will be the center point of web projects that are in development.
Setting Up a Project
- When working on the PHOS test server in the office, head over to devboard.test and add a new site. If working on a local server, open your vvv-custom.yml file and add a new site. See more info about local servers here.
- Once the site has been added, open up the terminal and cd into the newly created site’s theme folder.
- Run the following command and rename THEMENAME to your new project client/theme name:
git clone firstname.lastname@example.org:PHOSCreative/PHOS_Framework.git THEMENAME
– The repo that gets installed should include all the necessary theme files, as well as .babelrc, gulpfile.babel.js, and package.json
- Install the necessary base plugins:
- ACF Pro
- Better Search and Replace
- Classic Editor
- Gravity Forms
- Swift Mailer
- Velvet Blues Update URLS
- Go to the PHOS GitHub organization and create a new private repo for the project.
- Using the terminal, cd into your newly created theme folder and create a new git file by running:
- In your file explorer, navigate to your theme files, open the .git folder and open the config file.
- In the /.git/config file, replace the default repo address in terminal command in line 7 (right after “git remote add origin”) with the new git repo address (email@example.com:PHOSCreative/***.git)
- In your terminal, within the specific theme folder, run:
npm run start