Here is a complete list of all available files and folders in the root directory with a short description.
You don't need to know the contents of each file individually, as you will learn what they do over time. Just make sure you understand what you are responsible for (see the links). In addition, folders/files marked with a prefixed 💡 are important for getting started (that means, learn more about it).
All files and folders written in italics are not saved in Git, but automatically arranged when you develop or deploy the projects.
{% hint style="warning" %} Don't give up too early, because it can take a while until you find your way in the modern (WordPress plugin) development! {% endhint %}
- 📁
my-plugin
Folder you created withcreate-wp-react-app create-workspace
- 📁
coverage
Coverage reports, see this - 📁
.vscode
Visual Studio Code (VSCode) specific files - 📁
common
Common files can be reused by plugins and packages, or are root specific- 📁
create-wp-react-app
Templates or new plugins created withcreate-wp-react-app
, but you can ignore it - just commit it to your repository - 📁
patch-package
See patch-package package - 📄
.env-default
Default values for environment variables which are used in Docker Compose - 📄
.eslintrc
ESLint configuration file - 📄
generate-launch-json.ts
Dynamically createlaunch.json
file with all available plugins and packages (used for PHP debugging) - 📄
Gruntfile.plugin.ts
Predefined tasks for Grunt (only plugin, e. g. build a plugin) - 📄
Gruntfile.ts
Predefined tasks for Grunt (packages and plugins) - 📄
hookdoc.json
Configuration file for wp-hookdoc, used inyarn docs:hooks
- 📄
jest.base.js
Base Jest configuration file - 📄
phpcs.xml
Base PHP CodeSniffer configuration file - 📄
phpunit.base.php
Base PHPUnit bootstrap file - 📄
postcss-plugin-clean.ts
clean-css plugin for PostCSS - 📄 💡
tsconfig.json
Base TypeScript configuration file - 📄
vuepress-php.ts
phpDocumentor VuePress theme configuration file, used inyarn docs:php
- 📄 💡
webpack.factory.ts
Base webpack configuration file for plugins, see here - 📄
webpack.multi.ts
Multi-package configuration foryarn docker:start
- 📁
- 📁
devops
Files related to CI/CD, Docker and so on- 📁
.gitlab
CI/CD predefined jobs, included in root.gitlab-ci.ts
- 📄
stage-containerize.ts
Jobs for building and pushing docker files to GitLab container registry - 📄
stage-build.ts
Jobs for build plugin, docs and linting - 📄
stage-release.ts
Jobs for release, review applications and wordpress.org deployment - 📄
stage-test.ts
Jobs for tests - 📄
stage-validate.ts
Jobs for Docker garbage collection, semantic versioning and license scanner
- 📄
- 📁
docker
Predefined docker images- 📁
gitlab-ci
Dockerfile used in GitLab CI/CD jobs
- 📁
- 📁
docker-compose
Compose files for different contexts- 📄
docker-compose.e2e.yml
Used in Cypress E2E tests - 📄
docker-compose.local.yml
Used locally with port expose - 📄
docker-compose.traefik.yml
Used for Review Apps - 📄
docker-compose.yml
Base compose file, merged automatically with{plugins,packages}/*/devops/docker-compose/docker-compose.yml
files for extensibility, see here
- 📄
- 📁
scripts
Used in Docker containers (mounted)- 📄
container-wordpress-cli-entrypoint.sh
Extended entrypoint forwordpress-cli
service - 📄
container-wordpress-command.sh
Command forwordpress
service - 📄
custom-php.ini
Custom PHP configuration file forwordpress
service - 📄
e2e-tests-autologin-plugin.php
Micro-plugin for automatic login via URL in WordPress for E2E tests - 📄
lerna-ready-ci.sh
Makelerna
work in GitLab CI environment - 📄
purge-ci.sh
Purge Socker resources for E2E tests and Review Apps in CI/CD - 📄
task-xdebug-start.sh
Used intasks.json
file, starts XDebug in WordPress container - 📄
task-xdebug-stop.sh
Used intasks.json
file, stops XDebug in WordPress container - 📄 💡
wordpress-startup.sh
Global bash script to for custom actions not specific to single plugins, which get executed in start of the WordPress Docker container
- 📄
- 📁
- 📁
docs
Documentation you currently read available as markdown files - 📁
node_modules
Node dependencies - 📁
packages
Non-plugin packages (e.g. for shared styles)- 📁
utils
Predefined utils package coming withcreate-wp-react-app create-workspace
- 📁
devops
Files related to CI/CD, Docker and so on for this specific package- 📁
.gitlab
- 📄
.gitab-ci.ts
CI/CD similar root file, included in root.gitlab-ci.ts
- 📄
stage-build.ts
Predefined jobs for lint, included in./.gitlab-ci.ts
- 📄
stage-test.ts
Jobs for tests - 📄
stage-validate.ts
Jobs for license scanner
- 📄
- 📁
- 📁
languages
Languages files for this package- 📁
backend
Server-side language files- 📄
utils.pot
Language file can be translated with Poedit
- 📄
- 📁
frontend
Client-side language files- 📄
utils.pot
Language file can be translated with Poedit
- 📄
- 📁
- 📁
lib
TypeScript coding you will consume in your dependents- 📁
components
Predefined ReactJS components - 📁
factory
Factory functions (pass arguments, get dynamic functions)- 📄 📁
ajax.tsx
AJAX related functions (e. g. do WP REST API calls) - 📄 💡
context.tsx
React Context helpers - 📄 💡
i18n.tsx
__()
and so on for your client-side translations (uses@wordpress/i18n
) - 📄
index.tsx
Export all files from this folder
- 📄 📁
- 📁
types
Additional declaration files- 📄
global.d.ts
Avoid errors on plain JS packages (see this)
- 📄
- 📁
wp-api
Predefined WP REST API types- 📄
index.tsx
Export all files from this folder - 📄
rest.plugin.get.tsx
Types forwp-json/your-plugin/plugin
- 📄
- 📄
helpers.tsx
Some helper functions - 📄
index.tsx
Export all files from this folder - 📄 💡
options.tsx
Base options class ofsrc/inc/base/Assets.php
output
- 📁
- 📁
scripts
Scripts related to development- 📄 💡
Gruntfile.ts
Gruntfile for this package, extendscommon/Gruntfile.ts
- 📄 💡
- 📁
src
PHP coding you will consume in your dependents- 📄 💡
Activator.php
Abstract trait for activate, deactivate and install actions - 📄 💡
Assets.php
Abstract trait for assets management - 📄 💡
Base.php
Abstract base trait - 📄 💡
Core.php
Abstract core trait for main initialization of namespacing and so on, similar to the well-knownfunctions.php
- 📄 💡
PluginReceiver.php
Abstract trait for package development - 📄 💡
Localization.php
Abstract trait for i18n functionality - 📄 💡
Service.php
Final class for boilerplate related endpoints - 📄 💡
PackageLocalization.php
Extends from Localization class and is a helper class for package localization
- 📄 💡
- 📁
node_modules
Node dependencies - 📁
test
- 📁
jest
Put all your Jest tests here - 📁
phpunit
Put all your PHPUnit tests here - 📄
jest.config.js
Jest configuration file - 📄
jest.setup.js
Jest setup file - 📄
patchwork.json
Patchwork configuration file - 📄
phpunit.bootstrap.php
PHPUnit bootstrap file - 📄
phpunit.xdebug.php
PHPUnit + XDebug filtering for faster code coverage analysis - 📄
phpunit.xml
PHPUnit configuration file
- 📁
- 📄
CHANGELOG.md
Conventional changelog output - 📄
composer.json
Composer configuration file - 📄
composer.lock
Composer lock file - 📄
LICENSE
Package license file - 📄
LICENSE_3RD_PARTY_JS.md
Yarn dependencies disclaimer, see License checker - 📄
LICENSE_3RD_PARTY_PHP.md
Composer dependencies disclaimer, see License checker - 📄
package.json
Package definition file - 📄
README.md
"Because no one can read your mind (yet)" - makeareadme.com - 📄
tsconfig.json
TypeScript configuration file, extendscommon/tsconfig.json
- 📁
- 📁
- 📁 💡
plugins
See Plugin folder structure - 📄
.gitignore
Ignore files in your Git repository on commit (see this) - 📄 💡
.gitlab-ci.yml
CI/CD root file - 📄 💡
.gitlab-ci.ts
CI/CD root file, should include all{packages,plugins}/*/devops/.gitlab/.gitlab-ci.ts
files - 📄
.prettierignore
Ignore files to be prettified (see this) - 📄
package.json
Package definition file with Yarn Workspace definition - 📄
README.md
"Because no one can read your mind (yet)" - makeareadme.com - 📄
yarn.lock
Lock file for JavaScript dependencies
- 📁