This is a Next.js project bootstrapped with
create-next-app
.
- Git
- Node: Any version in the 20.x range, starting with v20.0.0 or higher.
- A fork of the repository (for any contributions).
- A clone of the ecommerce-cms repository on your local machine using
git clone https://github.com/udohjeremiah/ecommerce-cms.git
.
cd ecommerce-cms
to navigate to the project's root directory.pnpm install
to install the website's npm dependencies.
npm run dev
to start the development server (powered by Next.js)- Open
http://localhost:3000
in your favorite browser to access the site.
git checkout main
from any folder in your localecommerce-cms
repository.git pull origin main
to ensure you have the latest code from themain
branch.git checkout -b the-name-of-my-branch
(replacethe-name-of-my-branch
with a suitable name) to create a new branch.
- Follow the "Running locally" instructions.
- Save the files and check them in the browser.
- Changes to React components in the
src
directory will hot-reload.
- Run
npm run format
. This command uses Prettier to validate code formatting, ensuring it adheres to Prettier's style. To correct any code format issues, usenpm run format:fix
. - Run
npm run lint
. This command runs ESLint to catch any linting errors. Be sure to fix any warnings and errors that may appear. - If possible, test any visual changes in the latest versions of common browsers, both on desktop and mobile.
git add -A && git commit -m "My message"
(replacingMy message
with a commit message, such asFix navigation on mobile screen
) to stage and commit your changes.git push my-fork-name the-name-of-my-branch
(substitutemy-fork-name
with the actual name of the fork of theecommerce-cms
repository you have in your GitHub account andthe-name-of-my-branch
with the actual name of the branch you created in the previous step when creating a branch).- Go to the
ecommerce-cms
repo (i.e. the one you forked) and you should see recently pushed branches. - Follow GitHub's instructions to open a pull request.
- A Next.js build (
next build
) is triggered after your changes are pushed to GitHub.