Skip to content

Commit 7aed656

Browse files
committed
Move example projects to packages/toolbar/examples
Relocated Next.js and Vanilla JS toolbar demo examples and related plugins from the root examples/ and plugins/ directories into packages/toolbar/examples/. Updated documentation, configuration, and paths to reflect the new structure. Removed IMPLEMENTATION_BREAKDOWN.md as part of project cleanup.
1 parent 02b3807 commit 7aed656

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5938
-318
lines changed

IMPLEMENTATION_BREAKDOWN.md

Lines changed: 0 additions & 302 deletions
This file was deleted.

packages/toolbar/README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@
44
55
A lightweight, performant toolbar for headless WordPress. Works with any JavaScript framework or vanilla JS.
66

7+
## Table of Contents
8+
9+
- [Features](#features)
10+
- [Installation](#installation)
11+
- [Quick Start](#quick-start)
12+
- [Example Projects](#example-projects)
13+
- [Vanilla JavaScript](#vanilla-javascript)
14+
- [React (Recommended)](#react-recommended)
15+
- [Core API](#core-api)
16+
- [Toolbar Class](#toolbar-class)
17+
- [Renderers](#renderers)
18+
- [Styling](#styling)
19+
- [React Hooks API](#react-hooks-api)
20+
- [`useToolbar(toolbar)`](#usetoolbartoolbar)
21+
- [`useToolbarState(toolbar)`](#usetoolbarstatetoolbar)
22+
- [`useToolbarNodes(toolbar)`](#usetoolbarnodestoolbar)
23+
- [Framework Examples](#framework-examples)
24+
- [Vue](#vue)
25+
- [Vanilla JavaScript](#vanilla-javascript-1)
26+
- [TypeScript](#typescript)
27+
- [Development](#development)
28+
- [License](#license)
29+
30+
731
## Features
832

933
- 🎯 **Framework Agnostic** - Works with React, Vue, Svelte, or vanilla JavaScript
@@ -20,6 +44,15 @@ npm install @wpengine/hwp-toolbar
2044

2145
## Quick Start
2246

47+
### Example Projects
48+
49+
Check out the complete example projects in the `examples/` directory:
50+
51+
- **Next.js**: `examples/next/` - Full Next.js application with Apollo GraphQL integration
52+
- **Vanilla JavaScript**: `examples/vanilla/` - Pure JavaScript implementation with demo HTML
53+
54+
Each example includes setup instructions and demonstrates different integration patterns.
55+
2356
### Vanilla JavaScript
2457

2558
```javascript
@@ -260,4 +293,4 @@ open demo.html
260293
261294
## License
262295
263-
BSD-0-Clause
296+
BSD-2-Clause
File renamed without changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"phpVersion": "8.3",
3+
"plugins": [
4+
"https://github.com/wp-graphql/wp-graphql/releases/latest/download/wp-graphql.zip",
5+
"../plugins/hwp-cors-local",
6+
"../plugins/hwp-frontend-links",
7+
"../plugins/hwp-wp-env-helpers"
8+
],
9+
"config": {
10+
"WP_DEBUG": true,
11+
"SCRIPT_DEBUG": false,
12+
"GRAPHQL_DEBUG": true,
13+
"WP_DEBUG_LOG": true,
14+
"WP_DEBUG_DISPLAY": false,
15+
"SAVEQUERIES": false,
16+
"WP_HOME": "http://localhost:8888",
17+
"HEADLESS_FRONTEND_URL": "http://localhost:3000"
18+
},
19+
"mappings": {
20+
"db": "./wp-env/db",
21+
".htaccess": "./.htaccess"
22+
},
23+
"lifecycleScripts": {
24+
"afterStart": "wp-env run cli -- wp theme activate twentytwentyfour && wp-env run cli -- wp rewrite structure '/%postname%/' --hard"
25+
}
26+
}

0 commit comments

Comments
 (0)