Skip to content

Commit 6604830

Browse files
committed
composer
1 parent f7cc34f commit 6604830

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ The repo config file. Learn more about configuring [Turborepo](https://turborepo
6060

6161
1. [Docker Desktop](https://www.docker.com/products/docker-desktop/)
6262
2. [Node LTS](https://nodejs.dev/)
63+
3. [Composer](https://getcomposer.org/download/)
6364

64-
3. Clone this repo:
65+
4. Clone this repo:
6566

6667
```bash
6768
npx degit gregrickaby/nextjs-wordpress nextjs-wordpress

apps/docs/setup.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ The following will help you setup Next.js WordPress.
77
- [Requirements](#requirements)
88
- [Quick Start](#quick-start)
99
- [Manual Setup (Next.js)](#manual-setup-nextjs)
10-
- [Install](#install)
1110
- [ENV Variables](#env-variables)
1211
- [Manual Setup (WordPress)](#manual-setup-wordpress)
13-
- [Install](#install-1)
12+
- [Install](#install)
1413
- [1) Customize ENV Variables (optional)](#1-customize-env-variables-optional)
1514
- [2) Run Install Script](#2-run-install-script)
1615
- [3) Log into WordPress](#3-log-into-wordpress)
@@ -25,6 +24,7 @@ The following will help you setup Next.js WordPress.
2524

2625
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
2726
- [Node (LTS)](https://nodejs.org/en/)
27+
- [Composer](https://getcomposer.org/download/)
2828

2929
## Quick Start
3030

@@ -42,12 +42,6 @@ npm run setup
4242

4343
## Manual Setup (Next.js)
4444

45-
### Install
46-
47-
```bash
48-
npx create-next-app nextjs-wordpress --example https://github.com/gregrickaby/nextjs-wordpress
49-
```
50-
5145
### ENV Variables
5246

5347
Copy `.env.sample` to `.env.local`
@@ -166,7 +160,7 @@ The front-end has support for a "Books" custom post type with custom fields. Thi
166160
"show_in_menu_string": "",
167161
"menu_icon": "dashicons-book-alt",
168162
"register_meta_box_cb": null,
169-
"supports": ["title", "editor", "thumbnail", "custom-fields"],
163+
"supports": ["title", "editor", "excerpt", "thumbnail", "custom-fields"],
170164
"taxonomies": [],
171165
"labels": {
172166
"menu_name": "My Books",

lefthook.yml

+3
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ pre-commit:
1212
markdown:
1313
glob: '*.md'
1414
run: npx markdownlint {staged_files} --fix
15+
php:
16+
glob: '*.php'
17+
run: ./vendor/bin/phpcs {staged_files} --standard=.phpcs.xml

setup.sh

+14-4
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,32 @@ case $IS_DOCKER_DESKTOP_INSTALLED in
1313
exit 1;;
1414
esac
1515

16-
#2 - Do you have Node LTS installed?
17-
read -p "Do you have NodeJs LTS installed? Y/n " IS_NODEJS_INSTALLED
16+
#2 - Do you have Node 16+ installed?
17+
read -p "Do you have Node 16 or LTS installed? Y/n " IS_NODEJS_INSTALLED
1818
case $IS_NODEJS_INSTALLED in
1919
[yY] | "" ) ;;
20-
[nN] ) echo 'Please install NodeJs LTS before continuing https://nodejs.org/en/';
20+
[nN] ) echo 'Please install Node 16 or LTS before continuing https://nodejs.org/en/';
2121
exit;;
2222
* ) echo $IS_NODEJS_INSTALLED is an invalid response, please enter y or n;
2323
exit 1;;
2424
esac
2525

26+
#2 - Do you have Composer installed?
27+
read -p "Do you have Composer installed? Y/n " IS_COMPOSER_INSTALLED
28+
case $IS_COMPOSER_INSTALLED in
29+
[yY] | "" ) ;;
30+
[nN] ) echo 'Please install Composer before continuing https://getcomposer.org/download/';
31+
exit;;
32+
* ) echo $IS_COMPOSER_INSTALLED is an invalid response, please enter y or n;
33+
exit 1;;
34+
esac
35+
2636
#3 - Copy ENV file:
2737
cd ./apps/nextjs && cp .env.sample .env.local
2838

2939
#4 - Install Next.js:
3040
echo Installing dependencies...
31-
cd ../.. && npm i
41+
cd ../.. && npm i && composer install
3242

3343
#5 - Install WordPress (Docker Desktop must be running):
3444
cd ./apps/wordpress && chmod +x install.sh && ./install.sh

0 commit comments

Comments
 (0)