Coding Examples

Peanut examples GitHub repo

We've created a repository with example elements that show how to build with Peanut for Wordpress.

git clone git@github.com:swplabs/peanut-examples.git

This repo contains a sample "peanut.config.json" file that you'll need to update with your local Wordpress information. (See our "Quickstart" section for more information)

Once you've set everything up, get ready to take these examples for a spin. In the root directory of the cloned repo, you can run the following commands to get started:

npm install
npx peanut #this will compile the example elements

Once the compilation runs, you can go to your local Wordpress Admin area and enable the "Example Theme (Peanut For Wordpress)" theme.

If you have the Peanut for Wordpress CLI installed globally, you can run the following from your command line:

peanut -s /replace/with/path/to/repo/peanut-examples

Last updated