📖 lwcc.org
React app for the lwcc.org site header and footer.
Development
- Install nvm
- Install node:
nvm install node
- Make sure you are using node 16 with
nvm use 16
- Clone repo, install node modules, and start the
dev
server:
git clone https://github.com/atsolberg/lwcc.org.git
cd lwcc.org
npm i
npm run dev
Runs parcel in dev mode with the dev server running at https://localhost:1234
Build and Deploy to Production
- Make sure you are using node 16 with
nvm use 16
- From the lwcc.org directory, run:
npm run build
. ./scripts/wp-deploy.sh
- From the wp server, download
/www/lwcc.org/public_html/wp-content/themes/LWCC/footer.php
file - Update the
v
param in the header-footer script and css link to the current timestamp:
<script src="/public/header-footer.js?v=1660089730678"></script>
Note: npm runs prebuild
before the build
and postbuild
after.
The prebuild
cleans the public directory.
WordPress Shenanigans
Menu data was accessed from the wp rest api by adding the WP-REST-API V2 Menus
plugin.