-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port module setup from latest project
Used https://github.com/XedinUnknown/red-acre-test-a-1 as source. - No more `inc`: source files go into `src` (with some exceptions) - The app is now the main module, and all other modules are optional. - Modules can simply be autoloaded: no need for explicit factory files. - Bootstrap improved, making it more versatile, and usable in tests. - Core WP-related things come from WP context, avoiding needless coupling. - Tools now work on modules too, adding them to QA. - Test base classes for modular layers: test modules alone or together with ease. - Tests improved and added. - Add Node and WP-CLI to relevant virtual services. - Add WordPress directory mapping for easier debugging and more IDE features (#25). - Fix missing `get_plugin_data()` and other WP plugin APIs.
- Loading branch information
1 parent
f03094d
commit 08134e6
Showing
43 changed files
with
989 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
/vendor/ | ||
/node_modules/ | ||
/build/ | ||
/wordpress/ | ||
/.idea/workspace.xml | ||
/.idea/codeStyles/ | ||
/.idea/inspectionProfiles/ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
MODULE_DIRS := $(wildcard modules/* ) | ||
.PHONY: all \ | ||
build \ | ||
install \ | ||
install-php \ | ||
i18n \ | ||
i18n-makepot \ | ||
qa \ | ||
scan \ | ||
test \ | ||
test-php \ | ||
$(MODULE_DIRS) | ||
|
||
include .env | ||
|
||
all: build | ||
|
||
build: install | ||
$(MAKE) build-modules | ||
$(MAKE) i18n | ||
wait | ||
|
||
build-modules: $(MODULE_DIRS) | ||
|
||
$(MODULE_DIRS): | ||
@if [ -f "$@/Makefile" ]; then echo "$@/Makefile exists!"; $(MAKE) -C $@ build; fi | ||
|
||
install: | ||
$(MAKE) install-php | ||
|
||
install-php: composer.lock | ||
composer install | ||
|
||
i18n: i18n-makepot i18n-makemo | ||
|
||
i18n-makepot: | ||
wp i18n make-pot . $(LANGS_PATH)/strings.pot --allow-root | ||
|
||
i18n-makemo: | ||
wp i18n make-mo $(LANGS_PATH) --allow-root | ||
|
||
qa: | ||
$(MAKE) test | ||
$(MAKE) scan | ||
wait | ||
|
||
test: | ||
$(MAKE) test-php | ||
|
||
test-php: | ||
vendor/bin/phpunit | ||
|
||
scan: | ||
vendor/bin/psalm | ||
vendor/bin/phpcs -s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.