Skip to content

Commit 65b776b

Browse files
committed
WIP
1 parent ee32488 commit 65b776b

Some content is hidden

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

51 files changed

+6188
-0
lines changed

examples/angular/.wp-env.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"phpVersion": "8.3",
3+
"plugins": [
4+
"https://github.com/wp-graphql/wp-graphql/releases/latest/download/wp-graphql.zip",
5+
"https://downloads.wordpress.org/plugin/classic-editor.latest-stable.zip",
6+
"https://downloads.wordpress.org/plugin/wpgraphql-ide.latest-stable.zip"
7+
],
8+
"themes": [
9+
"https://downloads.wordpress.org/theme/twentytwentyone.latest-stable.zip"
10+
],
11+
"env": {
12+
"development": {
13+
"port": 8892
14+
},
15+
"tests": {
16+
"port": 8893
17+
}
18+
},
19+
"config": {
20+
"WP_DEBUG": true,
21+
"SCRIPT_DEBUG": false,
22+
"GRAPHQL_DEBUG": true,
23+
"WP_DEBUG_LOG": true,
24+
"WP_DEBUG_DISPLAY": false,
25+
"SAVEQUERIES": false
26+
},
27+
"mappings": {
28+
"db": "./wp-env/db",
29+
"wp-content/uploads": "./wp-env/uploads",
30+
".htaccess": "./wp-env/setup/.htaccess"
31+
},
32+
"lifecycleScripts": {
33+
"afterStart": "wp-env run cli -- wp theme activate twentytwentyone && wp-env run cli -- wp theme delete --all && wp-env run cli -- wp plugin delete hello-dolly && wp-env run cli -- wp rewrite structure '/%postname%/' && wp-env run cli -- wp rewrite flush"
34+
}
35+
}

examples/angular/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Angular Template Hierarchy and Data fetching Example
2+
3+
In this example we show how to implement the WP Template Hierarchy in Angular for use with a Headless WordPress backend using WPGraphQL.
4+
5+
## Getting Started
6+
7+
> [!IMPORTANT]
8+
> Docker Desktop needs to be installed to run WordPress locally.
9+
10+
1. Run `npm run example:setup` to install dependencies and configure the local WP server.
11+
2. Run `npm run example:start` to start the WP server and Angular development server.
12+
13+
> [!NOTE]
14+
> When you kill the long running process this will not shutdown the local WP instance, only Angular. You must run `npm run example:stop` to kill the local WP server.
15+
16+
## Trouble Shooting
17+
18+
To reset the WP server and re-run setup you can run `npm run example:prune` and confirm "Yes" at any prompts.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
ij_typescript_use_double_quotes = false
14+
15+
[*.md]
16+
max_line_length = off
17+
trim_trailing_whitespace = false
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db

0 commit comments

Comments
 (0)