🥜
Peanut for Wordpress
  • Introducing Peanut for Wordpress!
  • Getting Started
    • Quickstart
    • Coding Examples
    • CLI Reference
  • Building Elements
    • Components
    • Blocks
    • Plugins
    • Themes
  • Configuration
    • JSON Configuration
    • Webpack
    • ESLint
    • Wordpress
  • Whiteboard
    • Tutorial
  • Framework
    • Javascript SDK
    • REST API
  • SWP Labs
    • About Us
    • Support Us
Powered by GitBook
On this page
  1. Getting Started

Coding Examples

PreviousQuickstartNextCLI Reference

Last updated 7 months ago

Peanut examples GitHub repo

We've created a 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 "" 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
repository
Quickstart