-
-
Notifications
You must be signed in to change notification settings - Fork 1
Development Setup
This page explains how to set up a local development environment for contributing to or customizing the Aegis theme.
Ensure the following tools are installed on your machine:
| Tool | Minimum Version | Purpose |
|---|---|---|
| Node.js | 20 or later | JavaScript build tools |
| npm | 9 or later | Package management |
| PHP | 8.1 or later | Theme runtime and testing |
| Composer | 2 or later | PHP dependency management |
| Git | Any recent version | Version control |
| Docker | Latest | WordPress local environment (wp-env) |
node --version # Should output v20.x or later
npm --version # Should output 9.x or later
php --version # Should output 8.1.x or later
composer --version # Should output 2.x
git --version # Any recent version
docker --version # Latest stablegit clone https://github.com/aegiswp/theme.git aegis
cd aegiscomposer installThis installs all PHP packages into the vendor/ directory, including:
- PSR-4 autoloader configuration.
- Development tools (PHPUnit, PHPCS).
- Any required libraries.
npm installThis installs all JavaScript packages into the node_modules/ directory, including:
-
@wordpress/scripts— Build toolchain. - ESLint and stylelint — Code quality tools.
- Testing utilities.
The repository includes an .nvmrc file. If you use nvm:
nvm useThis switches to the correct Node.js version automatically.
Aegis uses wp-env (powered by Docker) for local development. This provides a complete WordPress installation with zero manual configuration.
npm run env:startOr directly:
npx wp-env startThis starts:
- WordPress on http://localhost:8888
- WordPress admin at http://localhost:8888/wp-admin/
- MySQL database on port 3306 (internal to Docker)
| Field | Value |
|---|---|
| Admin URL | http://localhost:8888/wp-admin/ |
| Username | admin |
| Password | password |
npm run env:stopOr:
npx wp-env stopTo start fresh with a clean WordPress installation:
npx wp-env clean allThe .wp-env.json file configures the local environment:
{
"core": null,
"phpVersion": "8.1",
"plugins": [],
"themes": ["."],
"port": 8888,
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"SCRIPT_DEBUG": true
}
}After installing dependencies, build the theme assets:
npm run buildFor development with file watching:
npm run devSee building-assets for detailed build documentation.
After setup, your workspace should look like:
aegis/
├── .wp-env.json # wp-env configuration
├── composer.json # PHP dependencies
├── package.json # Node.js dependencies
├── node_modules/ # Installed Node packages
├── vendor/ # Installed PHP packages
├── assets/ # Source files
│ ├── css/ # Source stylesheets
│ └── js/ # Source JavaScript
├── build/ # Compiled output
├── blocks/ # Custom block source
├── inc/ # PHP includes
├── parts/ # Template parts
├── patterns/ # Block patterns
├── styles/ # Style variations
├── templates/ # Page templates
└── theme.json # Theme configuration
A typical development session:
-
Start the environment:
npm run env:start -
Start the watcher:
npm run dev - Open the site: http://localhost:8888
- Make changes to source files.
- View changes in the browser (auto-refreshed by the watcher).
-
Run tests before committing:
npm run test - Commit changes using conventional commit messages.
Recommended extensions:
- PHP Intelephense — PHP language support.
- ESLint — JavaScript linting.
- Stylelint — CSS linting.
- WordPress Snippets — WordPress function completion.
- EditorConfig — Consistent formatting.
- Configure the PHP interpreter to use 8.1+.
- Set the WordPress source as an include path for autocompletion.
- Configure PHPCS with the WordPress coding standards.
To develop with the full Aegis ecosystem:
# Clone the free plugin
cd ../../../plugins/
git clone https://github.com/aegiswp/plugin.git aegis
# Clone Pro (requires access)
git clone https://github.com/aegiswp/pro.git aegis-proThen add them to .wp-env.json:
{
"plugins": [
"../../../plugins/aegis",
"../../../plugins/aegis-pro"
]
}Ensure Docker Desktop is running before starting wp-env.
Stop any other service using port 8888, or change the port in .wp-env.json.
On Linux/macOS, you may need to run Docker commands with appropriate permissions.
Use nvm use to switch to the correct version specified in .nvmrc.
- building-assets — Learn about the build process.
- code-quality — Set up linting and formatting.
- testing — Run the test suite.
- contributing — Contribution guidelines.
Aegis version 1.0.0 | GitHub Repository | Report an Issue | Atmostfear Entertainment
License: GPL-2.0-or-later