Skip to content

Feature: Installer Script #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a00e963
Adding base of script
srtfisher Nov 14, 2023
9cd8523
Normalizing composer.json with https://github.com/ergebnis/composer-n…
srtfisher Nov 14, 2023
4843284
Adding scaffolding of plugins
srtfisher Nov 14, 2023
4a8ea6f
Remove the pantheon mu-plugin from the plugin loader file
srtfisher Nov 14, 2023
ce33a8a
Comment out the plugin included to prevent a fatal
srtfisher Nov 14, 2023
190928d
Ignore with deployignore
srtfisher Nov 14, 2023
d0d0500
Setup scaffolding of base theme
srtfisher Nov 14, 2023
639714d
Disable theme namespace
srtfisher Nov 14, 2023
1ad88b8
Setting up the bulk of plugin scaffolding
srtfisher Nov 14, 2023
af3a553
Fixing file path
srtfisher Nov 14, 2023
1c6b900
Move the plugin file over
srtfisher Nov 14, 2023
21e89f5
Adding a readme that will be cleaned out by the configuration script
srtfisher Nov 15, 2023
8572d8b
Remove bogus files
srtfisher Nov 15, 2023
efda56a
Fix phpcs lint, simplify env check
srtfisher Nov 15, 2023
c8d7890
Adding more to README
srtfisher Nov 15, 2023
5368cb9
Add the prefixes to phpcs that will be replaced by the config script
srtfisher Nov 15, 2023
459797a
Scaffold out vip-config when setting up a VIP site
srtfisher Nov 15, 2023
532b8ff
Uncomment plugin so its ready to go after configuration
srtfisher Nov 15, 2023
8578432
Remove TODOs and leave only one for scaffolding out the theme
srtfisher Nov 15, 2023
4f47628
Code review feedback
srtfisher Nov 21, 2023
dc1c8c8
Fixing grep command
srtfisher Nov 21, 2023
4c5ee7a
Make selector less greedy
srtfisher Nov 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@

<!-- The version set here matches the minimum version tested in CI. -->
<config name="minimum_supported_wp_version" value="6.2" />

<!-- Define the prefixes that can be used by the plugin -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="vendor_name" />
<element value="create_wordpress_project" />
</property>
</properties>
</rule>
</ruleset>
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
setup:
php ./configure.php

.PHONY: setup
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,46 @@
<!--delete-->
# Create WordPress Project

This is a skeleton WordPress project that can be used to quickly scaffold
WordPress projects that work with Alley's
[create-wordpress-plugin](https://github.com/alleyinteractive/create-wordpress-plugin)
and
[create-wordpress-theme](https://github.com/alleyinteractive/create-wordpress-theme)
starter kits.

This template is rooted at the `wp-content` and supports both Pantheon and
WordPress VIP hosting environments with deployment workflows for each. It is
powered by [Composer](https://getcomposer.org/) to manage dependencies and
[Turborepo](https://turbo.build/repo) to build front-end assets in your project. The template includes both GitHub Actions and Buddy workflows for continuous integration and deployment.

Also included is a configuration script to easily replace all placeholders throughout the project and scaffold out your plugin/theme.

## Getting Started

Follow these steps to get started:

1. Press the "Use template" button at the top of this repo to create a new repo
with the contents of this skeleton.
2. Run `make` (or `php ./configure.php`) to run the configuration script that
will replace all placeholders throughout all the files.
3. Have fun creating your WordPress site! 🎊

<!--/delete-->

# create-wordpress-project
A starter structure for the wp-content directory on a new WordPress project.

A skeleton for WordPress projects rooted at `wp-content` using Alley's best
practices for WordPress development.

## Credits

This project is actively maintained by [Alley
Interactive](https://github.com/alleyinteractive). Like what you see? [Come work
with us](https://alley.com/careers/).

- [author_name](https://github.com/author_name)
- [All Contributors](../../contributors)

## License

The GNU General Public License (GPL) license. Please see [License File](LICENSE) for more information.
66 changes: 33 additions & 33 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
{
"name": "alleyinteractive/create-wordpress-project",
"description": "A skeleton WordPress project",
"license": "GPL-2.0-or-later",
"type": "project",
"keywords": [
"alleyinteractive",
"create-wordpress-project"
],
"authors": [
{
"name": "Alley",
"email": "[email protected]"
}
],
"homepage": "https://github.com/alleyinteractive/create-wordpress-project",
"require": {
"php": "^8.2",
"alleyinteractive/composer-wordpress-autoloader": "^1.0",
"composer/installers": "^1.0",
"pantheon-systems/pantheon-mu-plugin": "^1.0"
},
"require-dev": {
"alleyinteractive/alley-coding-standards": "^2.0",
"mantle-framework/testkit": "^0.12",
"szepeviktor/phpstan-wordpress": "^1.1"
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org",
"only": [
"wpackagist-plugin/*"
]
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"alleyinteractive/composer-wordpress-autoloader": true,
Expand All @@ -14,7 +45,6 @@
},
"sort-packages": true
},
"description": "A skeleton WordPress project",
"extra": {
"installer-paths": {
"mu-plugins/{$name}": [
Expand All @@ -33,35 +63,6 @@
}
}
},
"homepage": "https://github.com/alleyinteractive/create-wordpress-project",
"keywords": [
"alleyinteractive",
"create-wordpress-project"
],
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"name": "alleyinteractive/create-wordpress-project",
"prefer-stable": true,
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org",
"only": [
"wpackagist-plugin/*"
]
}
],
"require": {
"alleyinteractive/composer-wordpress-autoloader": "^1.0",
"composer/installers": "^1.0",
"pantheon-systems/pantheon-mu-plugin": "^1.0",
"php": "^8.0"
},
"require-dev": {
"alleyinteractive/alley-coding-standards": "^1.0",
"mantle-framework/testkit": "^0.11",
"szepeviktor/phpstan-wordpress": "^1.1"
},
"scripts": {
"phpcbf": [
"@phpcbf:plugin",
Expand All @@ -75,13 +76,13 @@
],
"phpcs:plugin": "cd plugins/create-wordpress-plugin && phpcs .",
"phpcs:theme": "cd themes/create-wordpress-theme && phpcs .",
"phpstan": "phpstan --memory-limit=512M",
"phpunit": [
"@phpunit:plugin",
"@phpunit:theme"
],
"phpunit:plugin": "cd plugins/create-wordpress-plugin && phpunit",
"phpunit:theme": "cd themes/create-wordpress-theme && phpunit",
"phpstan": "phpstan --memory-limit=512M",
"setup": [
"composer install --quiet --no-interaction"
],
Expand All @@ -90,6 +91,5 @@
"@phpstan",
"@phpunit"
]
},
"type": "project"
}
}
Loading