xwp / doc-hooks
README
A monorepo of building blocks for projects at XWP:
Requirements
- Node.js for generating projects from the templates.
- Docker with Docker Compose for contributing to this project and the generated projects.
Use a package manager like Homebrew on macOS or Chocolatey on Windows to install the dependencies:
brew install git node@14 docker docker-compose
Quick Start
To generate a new WordPress site, theme or plugin project, run:
npx git+ssh://git@github.com:xwp/io
Contribute
Concepts
-
We use Javascript as the primary language for all tools and scripts because it is cross-platform and accessible to all web developers.
-
We use WordPress coding standards for all JS code (even Node.js packages) to keep it consistent with the WordPress projects we're usually working on.
-
We use Docker containers to encapsulate and run the same software packages across different host environments and operating systems. This allows running the same tools during local development and continuous integration tasks.
-
We use GitHub Packages as our Docker container registry because it comes bundled with our GitHub organization.
-
We use GitHub Actions for automating our workflows because it is fast and comes bundled with our GitHub organization.
Scripts
-
npm run lint
to lint all files according to the configured coding standards. Runnpm run lint -- --fix
to fix the fixable issues. -
npm run docker -- make TASK
to run tasks for linting, building and deploying Docker images as defined in docker/Makefile.
Known Issues
@wordpress/eslint-plugin
can't resolve theprettier
fork, see this issue.
What is "io"?
"In computing, input/output (I/O, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, possibly a human or another information processing system." from Wikipedia
This tool scaffolds a project from your inputs.