Skip to content

Commit 89ae709

Browse files
author
Anthony Burchell
committed
scaffold plugin and tests
0 parents  commit 89ae709

29 files changed

+23964
-0
lines changed

.gitignore

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
### Vim template
2+
# swap
3+
[._]*.s[a-v][a-z]
4+
[._]*.sw[a-p]
5+
[._]s[a-v][a-z]
6+
[._]sw[a-p]
7+
# session
8+
Session.vim
9+
# temporary
10+
.netrwhist
11+
*~
12+
# auto-generated tag files
13+
tags
14+
### Vagrant template
15+
.vagrant/
16+
### SublimeText template
17+
# cache files for sublime text
18+
*.tmlanguage.cache
19+
*.tmPreferences.cache
20+
*.stTheme.cache
21+
22+
# workspace files are user-specific
23+
*.sublime-workspace
24+
25+
# project files should be checked into the repository, unless a significant
26+
# proportion of contributors will probably not be using SublimeText
27+
# *.sublime-project
28+
29+
# sftp configuration file
30+
sftp-config.json
31+
32+
# Package control specific files
33+
Package Control.last-run
34+
Package Control.ca-list
35+
Package Control.ca-bundle
36+
Package Control.system-ca-bundle
37+
Package Control.cache/
38+
Package Control.ca-certs/
39+
Package Control.merged-ca-bundle
40+
Package Control.user-ca-bundle
41+
oscrypto-ca-bundle.crt
42+
bh_unicode_properties.cache
43+
44+
# Sublime-github package stores a github token in this file
45+
# https://packagecontrol.io/packages/sublime-github
46+
GitHub.sublime-settings
47+
### Eclipse template
48+
49+
.metadata
50+
bin/
51+
!tests/bin/
52+
tmp/
53+
*.tmp
54+
*.bak
55+
*.swp
56+
*~.nib
57+
local.properties
58+
.settings/
59+
.loadpath
60+
.recommenders
61+
62+
# Eclipse Core
63+
.project
64+
65+
# External tool builders
66+
.externalToolBuilders/
67+
68+
# Locally stored "Eclipse launch configurations"
69+
*.launch
70+
71+
# PyDev specific (Python IDE for Eclipse)
72+
*.pydevproject
73+
74+
# CDT-specific (C/C++ Development Tooling)
75+
.cproject
76+
77+
# JDT-specific (Eclipse Java Development Tools)
78+
.classpath
79+
80+
# Java annotation processor (APT)
81+
.factorypath
82+
83+
# PDT-specific (PHP Development Tools)
84+
.buildpath
85+
86+
# sbteclipse plugin
87+
.target
88+
89+
# Tern plugin
90+
.tern-project
91+
92+
# TeXlipse plugin
93+
.texlipse
94+
95+
# STS (Spring Tool Suite)
96+
.springBeans
97+
98+
# Code Recommenders
99+
.recommenders/
100+
101+
# Scala IDE specific (Scala & Java development for Eclipse)
102+
.cache-main
103+
.scala_dependencies
104+
.worksheet
105+
### macOS template
106+
*.DS_Store
107+
.AppleDouble
108+
.LSOverride
109+
110+
# Icon must end with two \r
111+
Icon
112+
113+
114+
# Thumbnails
115+
._*
116+
117+
# Files that might appear in the root of a volume
118+
.DocumentRevisions-V100
119+
.fseventsd
120+
.Spotlight-V100
121+
.TemporaryItems
122+
.Trashes
123+
.VolumeIcon.icns
124+
.com.apple.timemachine.donotpresent
125+
126+
# Directories potentially created on remote AFP share
127+
.AppleDB
128+
.AppleDesktop
129+
Network Trash Folder
130+
Temporary Items
131+
.apdisk
132+
### Linux template
133+
134+
# temporary files which can be created if a process still has a handle open of a deleted file
135+
.fuse_hidden*
136+
137+
# KDE directory preferences
138+
.directory
139+
140+
# Linux trash folder which might appear on any partition or disk
141+
.Trash-*
142+
143+
# .nfs files are created when an open file is removed but is still being accessed
144+
.nfs*
145+
### JetBrains template
146+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
147+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
148+
149+
# User-specific stuff:
150+
.idea
151+
152+
## File-based project format:
153+
*.iws
154+
155+
## Plugin-specific files:
156+
157+
# IntelliJ
158+
/out/
159+
160+
# mpeltonen/sbt-idea plugin
161+
.idea_modules/
162+
163+
# JIRA plugin
164+
atlassian-ide-plugin.xml
165+
166+
# Crashlytics plugin (for Android Studio and IntelliJ)
167+
com_crashlytics_export_strings.xml
168+
crashlytics.properties
169+
crashlytics-build.properties
170+
fabric.properties
171+
### Windows template
172+
# Windows thumbnail cache files
173+
Thumbs.db
174+
ehthumbs.db
175+
ehthumbs_vista.db
176+
177+
# Folder config file
178+
Desktop.ini
179+
180+
# Recycle Bin used on file shares
181+
$RECYCLE.BIN/
182+
183+
# Windows Installer files
184+
*.cab
185+
*.msi
186+
*.msm
187+
*.msp
188+
189+
# Windows shortcuts
190+
*.lnk
191+
### TextMate template
192+
*.tmproj
193+
*.tmproject
194+
tmtags
195+
196+
# Build Assets
197+
node_modules
198+
vendor
199+
/plugin/languages/*.pot
200+
assets/css/*.css
201+
assets/css/*.map
202+
assets/js/*.js
203+
assets/js/*.map
204+
coverage.clover
205+
/plugin/scripts/*-min.js
206+
wpe-php-compat.zip
207+
.phpunit.result.cache
208+
209+
# Docker files
210+
Docker/database
211+
Docker/wordpress
212+
Docker/logs
213+
Docker/debug
214+
!Docker/bin
215+
216+
# Unit tests
217+
!/tests/bin/
218+
219+
# WordPress core (for IDEs)
220+
/wordpress/
221+
222+
# Build files
223+
/build/
224+
clover.xml

.jshintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
gulpfile.js
2+
**/*-min.js
3+
wordpress/
4+
node_modules/
5+
vendor/

.jshintrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"boss": true,
3+
"curly": true,
4+
"eqeqeq": true,
5+
"eqnull": true,
6+
"esversion": 3,
7+
"expr": true,
8+
"immed": true,
9+
"noarg": true,
10+
"nonbsp": true,
11+
"onevar": true,
12+
"quotmark": "single",
13+
"trailing": true,
14+
"undef": true,
15+
"unused": true,
16+
"browser": true,
17+
"globals": {
18+
"_": false,
19+
"Backbone": false,
20+
"jQuery": false,
21+
"JSON": false,
22+
"wp": false,
23+
"export": false,
24+
"module": false,
25+
"require": false
26+
}
27+
}

.lando.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: wpe-php-compat
2+
recipe: wordpress
3+
config:
4+
webroot: wordpress
5+
php: '7.4'
6+
via: nginx
7+
database: mariadb
8+
services:
9+
mailhog:
10+
type: mailhog
11+
portforward: true
12+
hogfrom:
13+
- appserver
14+
phpmyadmin:
15+
type: phpmyadmin
16+
hosts:
17+
- database
18+
appserver:
19+
xdebug: debug
20+
overrides:
21+
volumes:
22+
- ./plugin:/app/wordpress/wp-content/plugins/wpe-php-compat
23+
tooling:
24+
xdebug-on:
25+
service: appserver
26+
description: Enable xdebug for nginx.
27+
cmd: docker-php-ext-enable xdebug && pkill -o -USR2 php-fpm && echo "Enabling xdebug"
28+
user: root
29+
xdebug-off:
30+
service: appserver
31+
description: CUSTOM Disable xdebug for nginx.
32+
cmd: rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && pkill -o -USR2 php-fpm && echo "Disabling xdebug"
33+
user: root

.vscode/extensions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"ikappas.phpcs",
4+
"bmewburn.vscode-intelephense-client",
5+
"neilbrayfield.php-docblocker",
6+
"persoderlind.vscode-phpcbf",
7+
"felixfbecker.php-debug",
8+
"dbaeumer.jshint",
9+
"johnbillion.vscode-wordpress-hooks"
10+
]
11+
}

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Listen for XDebug",
6+
"type": "php",
7+
"request": "launch",
8+
"port": 9003,
9+
"log": true,
10+
"pathMappings": {
11+
"/app/wordpress/wp-content/plugins/wpe-php-compat/": "${workspaceFolder}/plugin",
12+
"/app/wordpress/": "${workspaceFolder}/wordpress",
13+
}
14+
}
15+
]
16+
}

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"phpcs.standard": "phpcs.xml",
3+
"phpcbf.executablePath": "${workspaceRoot}/vendor/bin/phpcbf",
4+
"phpcbf.standard": "phpcs.xml",
5+
"intelephense.diagnostics.undefinedConstants": false,
6+
}

.wp-env.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["./plugin"]
3+
}

Docker/Dockerfile-node

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM node:lts
2+
ARG UID=1000
3+
ARG GID=1000
4+
5+
RUN groupmod -g ${GID} node && usermod -u ${UID} -g ${GID} node

Docker/Dockerfile-php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM php:7.4-cli
2+
3+
RUN apt-get update && \
4+
apt-get install -y \
5+
git \
6+
unzip \
7+
--no-install-recommends && \
8+
rm -r /var/lib/apt/lists/*
9+
10+
RUN pecl install xdebug && \
11+
docker-php-ext-enable xdebug
12+
13+
RUN echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini && \
14+
echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini && \
15+
echo "xdebug.remote_connect_back=0" >> /usr/local/etc/php/conf.d/xdebug.ini && \
16+
echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/xdebug.ini && \
17+
echo "xdebug.profiler_enable=0" >> /usr/local/etc/php/conf.d/xdebug.ini
18+
19+
VOLUME [ "/app" ]
20+
21+
WORKDIR /app

0 commit comments

Comments
 (0)