Contributing
There are many ways to contribute to this project:
- Discuss open issues to help define the future of the project
- Submit bugs and help verify fixes
- Review and discuss pull requests
- Level up the documentation
- Monitor and help answer questions in Github Discussions
Monorepo Folder Structure
This project is a monorepo, which makes it easier to develop all the different codebases in a central location. The folder structure looks like:
nextjs-wordpress-starter
├── docs
├── frontend
├── packages
├── scripts
└── tests
- /docs: The documentation for this project, powered by Docusaurus.
- /frontend: Currently, this holds the codebase for the Next.js powered frontend.
- /packages: In the future this will house our NPM packages.
- /scripts: In the future this will house build scripts.
- /tests: In the future this will house tests.
Submitting Issues and Feature Requests
Before submitting an issue or making a feature request, please search for existing issues.
If you do file an issue, be sure to fill out the issue report completely!
Development
Git Workflow
- Create a
feature
branch offmain
- Work locally adhering to coding standards
- When your
feature
has been tested, open a Pull Request (PR) and fill out the PR template - Your PR must pass assertions and deploy successfully
- After peer review, the PR will be merged back into
main
- Repeat ♻️
Code Linting
This project has several rulesets and uses ESLint, Prettier, and Stylelint to enforce standards. In addition to real-time linting, you could run the following commands in your terminal.
First change directories into either /frontend
or /docs
Lint your code:
npm run lint
Format your code:
npm run format
These commands are also used in a pre-commit hook.
Tips to help your PR get approved
- Make sure your code editor supports real-time linting and has the recommended extensions installed
- JSDocs are required for all JavaScript functions
- Run
npm run build && npm run start
before submitting your PR, to ensure a successful build - Be courteous in your communication
Preview Deployments
Vercel is connected to this Github repository and will automatically build and deploy a unique URL for each Pull Request. Learn more about Vercel + Github integration.
Storybook
To work with Storybook on your Local, change directories into /frontend
and run the following command:
npm run storybook
Stories are written in .mdx
and should be placed next to the component.
Learn how to write stories for this starter.
Thanks for contributing — you rock! 🤘