Skip to content

Commit

Permalink
Merge branch 'develop' into feature/scaffolder-package-json
Browse files Browse the repository at this point in the history
  • Loading branch information
alley-ci authored May 14, 2024
2 parents 5d6e91a + 3655d0d commit a7f70eb
Show file tree
Hide file tree
Showing 8 changed files with 516 additions and 558 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-wordpress-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: alleyinteractive/action-update-wordpress-plugin@v1.2.1
- uses: alleyinteractive/action-update-wordpress-plugin@v2.0.0
with:
plugin-file: 'plugin.php'
upgrade-npm-dependencies: "true"
2 changes: 1 addition & 1 deletion .scaffolder/plugin-feature/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ files:
destination: src/features/{{ wpClassFilename inputs.featureName }}
- source: test.php.hbs
if: "{{ inputs.tests }}"
destination: tests/Features/{{ psrClassFilename inputs.featureName suffix="Test.php" }}
destination: tests/Features/{{ psr4ClassFilename inputs.featureName suffix="Test.php" }}
6 changes: 3 additions & 3 deletions .scaffolder/plugin-feature/test.php.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* {{ psrClassName name }} test class file
* {{ psr4ClassName name }} test class file
*
* @package create-wordpress-plugin
*/
Expand All @@ -11,11 +11,11 @@ use Create_WordPress_Plugin\Tests\TestCase;
use Create_WordPress_Plugin\\{{ wpNamespace inputs.featureName prefix="Features" }}\\{{ wpClassName inputs.featureName }};

/**
* {{ replace (psrClassName inputs.featureName) "_" " " }} Test for the {{ wpClassName inputs.featureName }} class.
* {{ replace (psr4ClassName inputs.featureName) "_" " " }} Test for the {{ wpClassName inputs.featureName }} class.
*
* @link https://mantle.alley.com/docs/testing
*/
class {{ psrClassName inputs.featureName suffix="Test" }} extends TestCase {
class {{ psr4ClassName inputs.featureName suffix="Test" }} extends TestCase {
/**
* An example test for the feature.
*/
Expand Down
755 changes: 398 additions & 357 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,25 @@
"test": "jest --passWithNoTests"
},
"dependencies": {
"@alleyinteractive/block-editor-tools": "^0.7.0",
"@alleyinteractive/block-editor-tools": "^0.10.0",
"@wordpress/block-editor": "^12.10.14",
"@wordpress/blocks": "^12.19.13",
"@wordpress/components": "^25.8.14",
"@wordpress/data": "^9.12.13",
"@wordpress/edit-post": "^7.19.16",
"@wordpress/i18n": "^4.42.13",
"@wordpress/plugins": "^6.10.14",
"dompurify": "^3.0.9",
"dompurify": "^3.1.3",
"prop-types": "^15.8.1",
"react": "18.2.0",
"react-dom": "18.2.0"
"react": "18.3.1",
"react-dom": "18.3.1"
},
"devDependencies": {
"@alleyinteractive/build-tool": "^0.1.4",
"@alleyinteractive/create-entry": "^0.0.4",
"@alleyinteractive/eslint-config": "^0.1.6",
"@alleyinteractive/stylelint-config": "^0.0.2",
"@babel/preset-env": "^7.24.0",
"@babel/preset-env": "^7.24.5",
"@types/jest": "^29.5.12",
"@types/wordpress__block-editor": "^11.5.11",
"@types/wordpress__blocks": "^12.5.13",
Expand All @@ -70,7 +70,7 @@
"check-node-version": "^4.2.1",
"jest": "^29.7.0",
"ts-jest": "^29.1.2",
"typescript": "^5.4.2",
"typescript": "^5.4.5",
"webpack-cli": "^5.1.4"
}
}
11 changes: 5 additions & 6 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

namespace Create_WordPress_Plugin;

use Alley\WP\Features\Group;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}
Expand Down Expand Up @@ -63,11 +65,8 @@ function () {
* Instantiate the plugin.
*/
function main(): void {
// This should be an array with keys set to feature classnames and arguments.
$features = [
// Add initial features here.
];
$features = apply_filters( 'create_wordpress_plugin_features', $features );
Feature_Manager::add_features( $features );
// Add features here.
$plugin = new Group();
$plugin->boot();
}
main();
80 changes: 0 additions & 80 deletions src/class-feature-manager.php

This file was deleted.

Loading

0 comments on commit a7f70eb

Please sign in to comment.