Repository navigation
Expand file tree
/
Copy pathcomposer.json
More file actions
162 lines (162 loc) · 5.64 KB
/
Copy pathcomposer.json
File metadata and controls
162 lines (162 loc) · 5.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
"name": "newfold-labs/wp-module-data",
"description": "Newfold Data Module",
"type": "library",
"license": "GPL-2.0-or-later",
"repositories": {
"newfold-labs/wp-plugin-bluehost": {
"type": "package",
"package": {
"name": "newfold-labs/wp-plugin-bluehost",
"type": "wordpress-plugin",
"version": "dev-latest-zip",
"dist": {
"url": "https://github.com/newfold-labs/wp-plugin-bluehost/releases/latest/download/bluehost-wordpress-plugin.zip",
"type": "zip"
},
"installation-source": "dist"
}
},
"newfold-labs/*": {
"type": "composer",
"url": "https://newfold-labs.github.io/satis/",
"only": [
"newfold-labs/*"
]
},
"wp-packages": {
"type": "composer",
"url": "https://repo.wp-packages.org"
}
},
"autoload": {
"psr-4": {
"NewfoldLabs\\WP\\Module\\Data\\": "includes/"
},
"files": [
"bootstrap.php"
]
},
"autoload-dev": {
"psr-4": {
"NewfoldLabs\\WP\\Module\\Data\\": [
"tests/phpunit/includes/",
"tests/wpunit/includes"
]
},
"classmap": [
"wordpress",
"tests/phpunit",
"tests/wpunit"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"johnpbloch/wordpress-core-installer": true,
"composer/installers": true,
"brianhenryie/composer-phpstorm": true
},
"optimize-autoloader": true,
"platform": {
"php": "7.4"
},
"platform-check": false,
"sort-packages": true
},
"scripts": {
"fix": [
"vendor/bin/phpcbf . --standard=phpcs.xml"
],
"cs-changes": [
"updated_files=$(echo $(git diff --name-only `git merge-base origin/main HEAD` | grep php)); if [ -n \"$updated_files\" ]; then phpcbf $(echo $updated_files); phpcs $(echo $updated_files); else echo \"No modified .php files for PHPCS.\"; fi;"
],
"lint": [
"vendor/bin/phpcs . --standard=phpcs.xml -s"
],
"i18n": [
"@i18n-pot",
"@i18n-po",
"@i18n-php",
"@i18n-json"
],
"i18n-ci-pre": [
"@i18n-pot",
"@i18n-po"
],
"i18n-ci-post": [
"@i18n-json",
"@i18n-php"
],
"i18n-json": "rm -f languages/*.json && vendor/bin/wp i18n make-json ./languages --pretty-print",
"i18n-php": "vendor/bin/wp i18n make-php ./languages --pretty-print",
"i18n-po": "vendor/bin/wp i18n update-po ./languages/wp-module-data.pot ./languages",
"i18n-pot": "vendor/bin/wp i18n make-pot . ./languages/wp-module-data.pot --domain=wp-module-data --headers='{\"Report-Msgid-Bugs-To\":\"https://github.com/newfold-labs/wp-module-data/issues\",\"POT-Creation-Date\":\"2025-02-13T09:55:55+00:00\"}' --exclude=tests,wordpress,vendor,wp-content,docs,cypress,assets,node_modules",
"create-symlinks": [
"Kporras07\\ComposerSymlinks\\ScriptHandler::createSymlinks"
],
"test": [
"phpunit --bootstrap tests/phpunit/bootstrap.php",
"codecept run wpunit"
],
"test-coverage": [
"if [ -d \"tests/_output/merged.cov\" ]; then rm -rf tests/_output/merged.cov; fi;",
"phpunit --bootstrap tests/phpunit/bootstrap.php --coverage-php tests/_output/unit.cov --coverage-text",
"codecept run wpunit --coverage wpunit.cov",
"phpcov merge --php tests/_output/merged.cov --html tests/_output/html tests/_output;",
"git diff main...head > /tmp/main.diff; phpcov patch-coverage --path-prefix $(pwd) ./tests/_output/merged.cov /tmp/main.diff || true",
"echo \"open tests/_output/html/index.html\" to view the report"
],
"post-install-cmd": [
"@create-symlinks"
],
"post-update-cmd": [
"@create-symlinks"
]
},
"scripts-descriptions": {
"create-symlinks": "Create sylimks between /wordpress, /wp-content and the root plugin for convenience.",
"fix": "Automatically fix coding standards issues where possible.",
"i18n": "Run the full local i18n pipeline (POT, PO, PHP, JSON).",
"i18n-ci-pre": "CI: regenerate the POT file and sync PO catalogs from it.",
"i18n-ci-post": "CI: regenerate JED JSON and PHP translation files from PO catalogs.",
"i18n-json": "Remove stale JSON catalogs, then generate JED JSON from PO files using wp i18n make-json.",
"i18n-php": "Generate PHP translation files from PO files using wp i18n make-php.",
"i18n-po": "Update PO files from the POT file using wp i18n update-po.",
"i18n-pot": "Scan source and generate the POT translation template using wp i18n make-pot.",
"lint": "Check files against coding standards.",
"test": "Run tests.",
"test-coverage": "Run tests with coverage, merge coverage and create HTML report."
},
"require": {
"ext-json": "*",
"newfold-labs/wp-module-context": "^1.0.3",
"newfold-labs/wp-module-loader": "^1.1.0",
"wp-forge/helpers": "^2.0.1",
"wp-forge/wp-query-builder": "^1.0.4",
"wp-forge/wp-upgrade-handler": "^1.0",
"wpscholar/url": "^1.2.5"
},
"require-dev": {
"10up/wp_mock": "^1.1.1",
"brianhenryie/composer-phpstorm": ">=0.4",
"johnpbloch/wordpress": ">=7.1.5",
"kporras07/composer-symlinks": "^1.3",
"lucatume/wp-browser": "^3.7.8",
"newfold-labs/wp-php-standards": "^2.0",
"newfold-labs/wp-plugin-bluehost": "dev-latest-zip",
"phpunit/phpcov": "^8.2.1",
"wp-cli/i18n-command": "^2.7.3",
"wp-plugin/jetpack": "^16.4",
"wp-plugin/woocommerce": ">=11.3.1",
"wp-plugin/woocommerce-payments": "^11.3.0",
"wp-theme/twentytwentyfive": ">=1.5"
},
"extra": {
"symlinks": {
".": "wp-content/plugins/wp-module-data"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}