@ideasonpurpose/build-tools-wordpress 2.6.6 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,303 +1,7 @@
1
- services:
2
- # Primary database for the local WordPress development environment.
3
- # Image from: https://hub.docker.com/_/mysql
4
- db:
5
- image: &db_img mysql:8.4
6
- restart: always
7
- volumes:
8
- - db_data:/var/lib/mysql
9
- - ./_db:/docker-entrypoint-initdb.d
10
- # - ./_log/mysql:/var/log/mysql
11
- environment:
12
- MYSQL_ALLOW_EMPTY_PASSWORD: 1
13
- MYSQL_DATABASE: wordpress
14
- MYSQL_USER: wordpress
15
- MYSQL_PASSWORD: wordpress
16
- # command: >
17
- # --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
1
+ include:
2
+ - path: ./node_modules/@ideasonpurpose/build-tools-wordpress/tooling/docker-compose.yml
3
+ # Set project_directory to force volumes to use this file as the relative root for included docker-compose files
4
+ project_directory: .
18
5
 
19
- # Ideas On Purpose's local WordPress development environment.
20
- # Update image version with `docker run ideasonpurpose/wordpress init`
21
- # Project info: https://github.com/ideasonpurpose/docker-wordpress-dev
22
- wordpress:
23
- depends_on:
24
- - db
25
- # image: &wp_img ideasonpurpose/wordpress:dev
26
- image: &wp_img ideasonpurpose/wordpress:6.7.2
27
- restart: always
28
- volumes:
29
- - wp_data:/var/www/html
30
- - ./wp-content/themes/${npm_package_name:-ioptheme}:/var/www/html/wp-content/themes/${npm_package_name:-ioptheme}
31
- - ./wp-content/plugins:/var/www/html/wp-content/plugins
32
- - ./wp-content/uploads:/var/www/html/wp-content/uploads
33
- - ${IOP_DEV_PLUGIN_1:-/tmp/null:/tmp/IOP_DEV_PLUGIN_1}
34
- - ${IOP_DEV_PLUGIN_2:-/tmp/null:/tmp/IOP_DEV_PLUGIN_2}
35
- - ${IOP_DEV_PLUGIN_3:-/tmp/null:/tmp/IOP_DEV_PLUGIN_3}
36
- - ${IOP_DEV_PLUGIN_4:-/tmp/null:/tmp/IOP_DEV_PLUGIN_4}
37
- - ${IOP_DEV_PLUGIN_5:-/tmp/null:/tmp/IOP_DEV_PLUGIN_5}
38
- - ${IOP_DEV_PLUGIN_6:-/tmp/null:/tmp/IOP_DEV_PLUGIN_6}
39
- - ${IOP_DEV_PLUGIN_7:-/tmp/null:/tmp/IOP_DEV_PLUGIN_7}
40
- - ${IOP_DEV_PLUGIN_8:-/tmp/null:/tmp/IOP_DEV_PLUGIN_8}
41
- - ./webpack/xdebug:/tmp/xdebug
42
-
43
- # Publish port 80 to an ephemeral host port to prepare for future local build tools
44
- ports:
45
- - "80"
46
-
47
- # Internally expose port 9003 for XDebug and profiling
48
- expose:
49
- - 9003
50
-
51
- # Link external plugin projects by defining host:container path pairs in .env
52
- # An example .env entry looks like this:
53
- # IOP_DEV_PLUGIN_1="../iop-data-model/:/var/www/html/wp-content/plugins/iop-data-model"
54
- environment:
55
- IOP_DEV_PLUGIN_1:
56
- IOP_DEV_PLUGIN_2:
57
- IOP_DEV_PLUGIN_3:
58
- IOP_DEV_PLUGIN_4:
59
- IOP_DEV_PLUGIN_5:
60
- IOP_DEV_PLUGIN_6:
61
- IOP_DEV_PLUGIN_7:
62
- IOP_DEV_PLUGIN_8:
63
- WP_ENVIRONMENT_TYPE:
64
- WP_MULTISITE:
65
-
66
- # Apache will throw errors for any ulimit value below 8192
67
- # NOTE THAT THIS MIGHT BE MORE THAN THE SYSTEM OFFERS
68
- # TODO: Still true?
69
- # TODO: Testing removal. 2025-03-18
70
- # ulimits:
71
- # nofile: 8192
72
-
73
- # Required for iptables port-mapping to work inside the Docker image
74
- # This is used to fix a PHP/WordPress issue where internal requests
75
- # from Site Health tried to load from external ports.
76
- cap_add:
77
- - NET_ADMIN
78
-
79
- # # TODO: Deprecated and likely ready to remove 2025-03-18
80
- # # Ideas On Purpose's development toolchain
81
- # # Image from: https://hub.docker.com/r/ideasonpurpose/docker-build
82
- # tools:
83
- # # image: ideasonpurpose/docker-build:dev
84
- # image: ideasonpurpose/docker-build:0.17.2
85
- # user: "${UID:-1000}:${GID:-1000}"
86
- # depends_on:
87
- # - wordpress
88
- # volumes:
89
- # - .:/usr/src/site/
90
- # ports:
91
- # - "${npm_config_port:-8080}:8080"
92
- # environment:
93
- # PORT: ${npm_config_port:-8080}
94
- # entrypoint: npm run
95
- # command: start
96
-
97
- # Utility service for running composer commands
98
- # Image from: https://hub.docker.com/_/composer
99
- composer:
100
- image: composer:2.8
101
- profiles: ["utility"]
102
- user: "${UID:-1000}:${GID:-1000}"
103
- environment:
104
- COMPOSER_HOME: /.composer
105
- volumes:
106
- - ./:/app
107
- - ~/.composer:/.composer
108
- command: install
109
-
110
- # Utility service which exposes wp-cli. Useful for testing pre-releases
111
- # Update image version with `docker run ideasonpurpose/wordpress init`
112
- # Project info: https://github.com/ideasonpurpose/docker-wordpress-dev
113
- wp-cli:
114
- depends_on:
115
- - db
116
- - wordpress
117
- image: *wp_img
118
- profiles: ["utility"]
119
- user: www-data
120
- volumes:
121
- - wp_data:/var/www/html
122
- - ./wp-content/themes/${npm_package_name:-ioptheme}:/var/www/html/wp-content/themes/${npm_package_name:-ioptheme}
123
- - ./wp-content/plugins:/var/www/html/wp-content/plugins
124
- - ./wp-content/uploads:/var/www/html/wp-content/uploads
125
- environment:
126
- - WP_CLI_CACHE_DIR=/tmp/wp-cli
127
- - WP_CLI_DISABLE_AUTO_CHECK_UPDATE=true
128
- command: wp theme activate ${npm_package_name:-ioptheme}
129
-
130
- # Runs phpMyAdmin on port 8002
131
- # Image from: https://hub.docker.com/_/phpmyadmin
132
- phpmyadmin:
133
- image: phpmyadmin:5.2-apache
134
- profiles: ["utility"]
135
- ports:
136
- - "${npm_config_port:-8002}:80"
137
- depends_on:
138
- - db
139
- environment:
140
- PMA_USER: root
141
- PMA_PASSWORD: ~
142
- UPLOAD_LIMIT: 1G
143
- command: |
144
- bash -c 'echo &&
145
- echo -e "🛠 \033[33mStarting phpMyAdmin at\033[0m \033[36mhttp://localhost:${npm_config_port:-8002}\033[0m" &&
146
- echo &&
147
- /docker-entrypoint.sh apache2-foreground'
148
-
149
- # XDebug profile viewer at http://localhost:9001 (change port with --port=xxxx)
150
- # Enable profiling by appending `?XDEBUG_PROFILE=1` to any request
151
- # https://hub.docker.com/r/wodby/webgrind
152
- webgrind:
153
- image: wodby/webgrind:1.9
154
- profiles: ["utility"]
155
- user: "${UID:-1000}:${GID:-1000}"
156
- ports:
157
- - "${npm_config_port:-9004}:8080"
158
- depends_on:
159
- - wordpress
160
- volumes:
161
- - ./webpack/xdebug:/tmp
162
- environment:
163
- WEBGRIND_DEFAULT_TIMEZONE: America/New_York
164
- command: |
165
- bash -c 'echo &&
166
- echo -e "🔍 \033[33mStarting WebGrind server at\033[0m \033[36mhttp://localhost:${npm_config_port:-9004}\033[0m" &&
167
- echo -e "⏱️ Profile any request by adding \033[1;35m?XDEBUG_PROFILE=1\033[0m to the url" &&
168
- echo &&
169
- php -S 0.0.0.0:8080 index.php
170
- '
171
-
172
- # Dumps the current database to _db/theme-YYYY-MM-DDTHHMMSS.sql.gz
173
- db-dump:
174
- image: *db_img
175
- profiles: ["utility"]
176
- depends_on:
177
- - db
178
- volumes:
179
- - ./_db:/usr/src
180
- environment:
181
- MYSQL_DATABASE: wordpress
182
- OWNER_GROUP: "${UID:-1000}:${GID:-1000}"
183
-
184
- # NOTE: The datbase dumpfile will include these CREATE/USE commands:
185
- # CREATE DATABASE `wordpress`;
186
- # USE `wordpress`;
187
- # to drop those lines, remove "--databases" from the mysqldump command
188
- command: |
189
- bash -c 'for i in {1..10}
190
- do echo -e "⏳ \033[33mWaiting for DB server...\033[0m" &&
191
- mysql --ssl-mode=DISABLED -s -h db -e "exit" && break || sleep 3
192
- done &&
193
- sleep 2 &&
194
- echo -e "✔️ \033[32mConnected to DB\033[0m" &&
195
- export DUMPFILE="/usr/src/'${npm_package_name:-dumpfile}'-$$(date +%FT%H%M%S).sql" &&
196
- echo $${DUMPFILE} &&
197
- mysqldump --ssl-mode=DISABLED -hdb --databases $${MYSQL_DATABASE} > "$${DUMPFILE}" &&
198
- gzip "$${DUMPFILE}" &&
199
- chown -R $${OWNER_GROUP} /usr/src &&
200
- echo "Successfully dumped database to \"$${DUMPFILE}.gz\""'
201
-
202
- # Reloads the database from the first found *.sql dumpfile in _db
203
- db-reload:
204
- image: *db_img
205
- profiles: ["utility"]
206
- depends_on:
207
- - db
208
- volumes:
209
- - ./_db:/usr/src/dumpfiles
210
- environment:
211
- MYSQL_DATABASE: wordpress
212
- command: |
213
- bash -c 'for i in {1..10}
214
- do echo -e "⏳ \033[33mWaiting for DB server...\033[0m" &&
215
- mysql --ssl-mode=DISABLED -s -h db -e "exit" && break || sleep 3
216
- done &&
217
- sleep 2 &&
218
- echo -e "✔️ \033[32mConnected to DB\033[0m" &&
219
- mysqladmin --ssl-mode=DISABLED -hdb -v -f drop $${MYSQL_DATABASE} &&
220
- mysqladmin --ssl-mode=DISABLED -hdb -v -f create $${MYSQL_DATABASE} &&
221
- echo Database \"$${MYSQL_DATABASE}\" created &&
222
- echo Reloading database from dumpfile &&
223
- mysql --ssl-mode=DISABLED -hdb $${MYSQL_DATABASE} < $$(ls /usr/src/dumpfiles/*.sql | tail -n1)'
224
-
225
- # Activates the theme directly in the database
226
- theme-activate:
227
- image: *db_img
228
- profiles: ["utility"]
229
- depends_on:
230
- - db
231
- volumes:
232
- - ./_db:/usr/src/dumpfiles
233
- environment:
234
- MYSQL_DATABASE: wordpress
235
- command: |
236
- bash -c 'for i in {1..10}
237
- do echo -e "⏳ \033[33mWaiting for DB server...\033[0m" &&
238
- mysql --ssl-mode=DISABLED -s -h db -e "exit" && break || sleep 3
239
- done &&
240
- sleep 2 &&
241
- echo -e "✔️ \033[32mConnected to DB\033[0m" &&
242
- if [[ $$(mysql --ssl-mode=DISABLED -s -h db $${MYSQL_DATABASE} -e "SHOW TABLES LIKE \"wp_options\"") ]]
243
- then
244
- echo -e "🎨 \033[36mActivating theme \033[0m\033[1m${npm_package_name:-ioptheme}\033[0m"
245
- mysql --ssl-mode=DISABLED -h db $${MYSQL_DATABASE} \
246
- -e "UPDATE wp_options \
247
- SET option_value = \"'${npm_package_name:-ioptheme}'\" \
248
- WHERE option_name in (\"template\",\"stylesheet\")"
249
- else
250
- echo -e "Unable to activate theme: \033[31m'\'wp_options\'' table does not exist.\033[0m"
251
- echo "To recreate an existing site, copy the site'\''s DB dumpfile into _db"
252
- echo If this project is starting from an empty database, you can ignore this message.
253
- fi'
254
-
255
- # Repairs permissions for known project files and directories
256
- repair-permissions:
257
- image: *wp_img
258
- profiles: ["utility"]
259
- volumes:
260
- - .:/usr/src/site
261
- environment:
262
- OWNER_GROUP: "${UID:-1000}:${GID:-1000}"
263
- entrypoint: /usr/local/bin/permissions.sh
264
-
265
- # Locally mirror remote sites by pulling the database, plugins and uploads
266
- # Remote connections are configured in the project's .env file
267
- pull:
268
- image: *wp_img
269
- profiles: ["utility"]
270
- volumes:
271
- - .:/usr/src/site
272
- entrypoint: |
273
- /usr/local/bin/pull.sh
274
- environment:
275
- OWNER_GROUP: "${UID:-1000}:${GID:-1000}"
276
- SSH_KEY_PATH:
277
- SSH_LOGIN:
278
- SSH_USER:
279
- SSH_PORT:
280
- SSH_WP_CONTENT_DIR:
281
- secrets:
282
- - SSH_KEY
283
-
284
- # Run the init script from ideasonpurpose/wordpress:latest (intentionally "latest")
285
- # to refresh tooling and bring the project inline with our boilerplate
286
- # Project info: https://github.com/ideasonpurpose/docker-wordpress-dev
287
- refresh:
288
- # image: ideasonpurpose/wordpress:dev
289
- image: ideasonpurpose/wordpress:latest
290
- profiles: ["utility"]
291
- volumes:
292
- - .:/usr/src/site
293
- command: init
294
-
295
- secrets:
296
- SSH_KEY:
297
- file: ${SSH_KEY_PATH:-~/.ssh/your_ssh_private_key}
298
-
299
- volumes:
300
- db_data:
301
- name: ${npm_package_name:-ioptheme}_db
302
- wp_data:
303
- name: ${npm_package_name:-ioptheme}_wp
6
+ # Uncomment this line to use a local dev build of the WordPress Docker image.
7
+ # services: { wordpress: { image: "ideasonpurpose/wordpress:dev" } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ideasonpurpose/build-tools-wordpress",
3
- "version": "2.6.6",
3
+ "version": "2.8.0",
4
4
  "description": "Build scripts and dependencies for IOP's WordPress development environments.",
5
5
  "homepage": "https://github.com/ideasonpurpose/build-tools-wordpress#readme",
6
6
  "bugs": {
@@ -21,9 +21,9 @@
21
21
  "bin": {
22
22
  "iop-build-port-reporter": "./bin/port-reporter.js",
23
23
  "iop-build-zip-archive": "./bin/zip.js",
24
- "iop-project-init": "./bin/project-init.js",
25
24
  "iop-html-php-prettier": "./bin/format-php-prettier.js",
26
- "iop-format-wp-block-pattern": "./bin/format-wp-block-pattern.js"
25
+ "iop-format-wp-block-pattern": "./bin/format-wp-block-pattern.js",
26
+ "iop-project-refresh": "./bin/refresh.js"
27
27
  },
28
28
  "directories": {
29
29
  "lib": "lib"
@@ -35,33 +35,31 @@
35
35
  "prettier": "@ideasonpurpose/prettier-config",
36
36
  "dependencies": {
37
37
  "@ideasonpurpose/prettier-config": "^1.0.1",
38
- "@ideasonpurpose/stylelint-config": "^1.1.4",
38
+ "@ideasonpurpose/stylelint-config": "^1.1.6",
39
39
  "@prettier/plugin-php": "^0.25.0",
40
- "@rollup/plugin-commonjs": "^29.0.2",
40
+ "@rollup/plugin-commonjs": "^29.0.3",
41
41
  "@rollup/plugin-json": "^6.1.0",
42
42
  "@rollup/plugin-node-resolve": "^16.0.3",
43
43
  "@svgr/webpack": "^8.1.0",
44
- "@wordpress/dependency-extraction-webpack-plugin": "^6.44.0",
44
+ "@wordpress/dependency-extraction-webpack-plugin": "^6.47.0",
45
45
  "ansi-html": "^0.0.9",
46
- "archiver": "^7.0.1",
47
- "auto-changelog": "^2.5.0",
46
+ "archiver": "^8.0.0",
48
47
  "autoprefixer": "^10.5.0",
49
48
  "babel-loader": "^10.1.1",
50
- "caniuse-lite": "^1.0.30001791",
49
+ "caniuse-lite": "^1.0.30001793",
51
50
  "chalk": "^5.6.2",
52
51
  "chalk-cli": "^6.0.0",
53
52
  "classnames": "^2.5.1",
54
53
  "cli-truncate": "^6.0.0",
55
54
  "copy-webpack-plugin": "^14.0.0",
56
55
  "cosmiconfig": "^9.0.1",
57
- "cross-env": "^10.1.0",
58
56
  "css-loader": "^7.1.4",
59
- "cssnano": "^7.1.7",
57
+ "cssnano": "^8.0.1",
60
58
  "dotenv": "^17.4.2",
61
59
  "esbuild-loader": "^4.4.3",
62
- "eslint": "^10.2.1",
60
+ "eslint": "^10.4.1",
63
61
  "filesize": "^11.0.17",
64
- "fs-extra": "^11.3.4",
62
+ "fs-extra": "^11.3.5",
65
63
  "globby": "^16.2.0",
66
64
  "html-webpack-plugin": "^5.6.7",
67
65
  "http-proxy": "^1.18.1",
@@ -71,7 +69,7 @@
71
69
  "lodash": "^4.18.1",
72
70
  "mini-css-extract-plugin": "^2.10.2",
73
71
  "ora": "^9.4.0",
74
- "postcss": "^8.5.12",
72
+ "postcss": "^8.5.15",
75
73
  "postcss-loader": "^8.2.1",
76
74
  "postcss-scss": "^4.0.9",
77
75
  "prettier": "^3.8.3",
@@ -79,28 +77,28 @@
79
77
  "read-package-up": "^12.0.0",
80
78
  "replacestream": "^4.0.3",
81
79
  "rimraf": "^6.1.3",
82
- "sass-embedded": "^1.99.0",
83
- "sass-loader": "^16.0.7",
84
- "semver": "^7.7.4",
80
+ "sass-embedded": "^1.100.0",
81
+ "sass-loader": "^17.0.0",
82
+ "semver": "^7.8.1",
85
83
  "sharp": "^0.34.5",
86
- "sort-package-json": "^3.6.1",
84
+ "sort-package-json": "^3.7.0",
87
85
  "string-length": "^7.0.1",
88
86
  "style-loader": "^4.0.0",
89
87
  "svgo": "^4.0.1",
90
88
  "svgo-loader": "^5.0.0",
91
89
  "version-everything": "^0.12.2",
92
- "webpack": "^5.106.2",
90
+ "webpack": "^5.107.2",
93
91
  "webpack-bundle-analyzer": "^5.3.0",
94
92
  "webpack-dev-middleware": "^8.0.3",
95
- "webpack-dev-server": "^5.2.3",
93
+ "webpack-dev-server": "^5.2.4",
96
94
  "webpack-manifest-plugin": "^6.0.1"
97
95
  },
98
96
  "peerDependencies": {
99
97
  "webpack-cli": "^6.0.1"
100
98
  },
101
99
  "devDependencies": {
102
- "@vitest/coverage-v8": "^4.1.5",
103
- "vitest": "^4.1.5"
100
+ "@vitest/coverage-v8": "^4.1.8",
101
+ "vitest": "^4.1.8"
104
102
  },
105
103
  "version-everything": {
106
104
  "files": [