Skip to content

Commit b252d74

Browse files
committed
Merge branch 'develop' into feature/add-support-to-webhook-events
2 parents ef9d3a9 + e396a99 commit b252d74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1113
-4511
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ plugin for WordPress.
1111
6. Update this README (see below for a starting point)
1212

1313
### Asset Compilation
14+
Note: We use [@wordpress/scripts](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/).
15+
1416
To compile your CSS & JS assets, run one of the following:
1517

16-
- `npm run dev` — Compiles all assets (except Form Extension assets) for development one time
17-
- `npm run watch` — Compiles all assets (except Form Extension assets) for development one time and then watches for
18-
changes, supporting [BrowserSync](https://laravel-mix.com/docs/5.0/browsersync)
19-
- `npm run dev:form-extension` — Compiles Form Extension assets for development one time
20-
- `npm run watch:form-extension` — Compiles Form Extension assets for development one time and then watches for changes,
21-
supporting [BrowserSync](https://laravel-mix.com/docs/5.0/browsersync)
22-
- `npm run start` — Compiles all assets for development one time and then watches for changes
18+
| Command | Description |
19+
|:----------------|:------------------------------------------------------------------------|
20+
| `npm run dev` | Runs a one time build for development. No production files are created. |
21+
| `npm run watch` | Automatically re-builds as changes are made. |
22+
| `npm run build` | Builds the minified production files for release.
2323

2424
## Concepts
2525

build.php

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
$files = array_filter( array_merge(
4949
[
5050
__DIR__ . '/readme.txt',
51-
__DIR__ . '/webpack.mix.js',
51+
__DIR__ . '/webpack.config.js',
5252
__DIR__ . '/composer.json',
5353
__DIR__ . '/.github/workflows/pre-release.yml',
5454
],
@@ -58,7 +58,9 @@
5858
rglob(__DIR__ . '/src/*.php', GLOB_NOSORT),
5959
rglob(__DIR__ . '/src/*.js', GLOB_NOSORT),
6060
rglob(__DIR__ . '/src/*.ts', GLOB_NOSORT),
61-
rglob(__DIR__ . '/src/*.tsx', GLOB_NOSORT)
61+
rglob(__DIR__ . '/src/*.tsx', GLOB_NOSORT),
62+
rglob(__DIR__ . '/src/*.scss', GLOB_NOSORT),
63+
rglob(__DIR__ . '/src/*.css', GLOB_NOSORT),
6264
), static function ( $file ) {
6365
return $file !== __FILE__;
6466
} );
@@ -67,6 +69,7 @@
6769
'GiveAddon' => trim($namespace),
6870
'\\Domain' => trim("\\$domain"),
6971
'src/Domain' => trim("src/$domain"),
72+
'Domain' => trim("$domain"),
7073
'ADDON_DOMAIN' => trim($domain),
7174
'ADDON_NAME' => trim($name),
7275
'ADDON_CONSTANT' => trim($constant),
@@ -86,26 +89,6 @@
8689
__DIR__ . "/$id.php"
8790
);
8891

89-
rename(
90-
__DIR__ . '/src/Domain/resources/js/admin/ADDON_ID-admin.ts',
91-
__DIR__ . "/src/Domain/resources/js/admin/$id-admin.ts"
92-
);
93-
94-
rename(
95-
__DIR__ . '/src/Domain/resources/js/frontend/ADDON_ID-frontend.js',
96-
__DIR__ . "/src/Domain/resources/js/frontend/$id-frontend.js"
97-
);
98-
99-
rename(
100-
__DIR__ . '/src/Domain/resources/css/admin/ADDON_ID-admin.scss',
101-
__DIR__ . "/src/Domain/resources/css/admin/$id-admin.scss"
102-
);
103-
104-
rename(
105-
__DIR__ . '/src/Domain/resources/css/frontend/ADDON_ID-frontend.scss',
106-
__DIR__ . "/src/Domain/resources/css/frontend/$id-frontend.scss"
107-
);
108-
10992
rename(
11093
__DIR__ . '/src/Domain',
11194
__DIR__ . "/src/$domain"

composer.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
"description": "ADDON_DESCRIPTION",
44
"type": "wordpress-plugin",
55
"license": "GPL-2.0-or-later",
6-
"require": {},
76
"require-dev": {
8-
"kjohnson/since-unreleased": "^1.0.0",
9-
"phpunit/phpunit": "^5",
10-
"yoast/phpunit-polyfills": "^1.1.0",
117
"squizlabs/php_codesniffer": "^3.5",
128
"phpcompatibility/phpcompatibility-wp": "^2.1",
139
"wp-coding-standards/wpcs": "^2.3",
1410
"phpcompatibility/php-compatibility": "^9.3",
15-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0"
11+
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
12+
"yoast/phpunit-polyfills": "^4.0"
1613
},
1714
"scripts": {
1815
"test": "./vendor/bin/phpunit --colors --stop-on-failure",
@@ -37,7 +34,7 @@
3734
},
3835
"config": {
3936
"platform": {
40-
"php": "7.0"
37+
"php": "7.4.0"
4138
},
4239
"allow-plugins": {
4340
"dealerdirect/phpcodesniffer-composer-installer": true

0 commit comments

Comments
 (0)