Skip to content

Commit 676c518

Browse files
committed
Set up Composer and scripts
1 parent e04666d commit 676c518

File tree

4 files changed

+2817
-5
lines changed

4 files changed

+2817
-5
lines changed

composer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "sebkay/wordpress-plugin-template",
3+
"type": "project",
4+
"authors": [
5+
{
6+
"name": "Seb Kay",
7+
"email": "[email protected]"
8+
}
9+
],
10+
"minimum-stability": "stable",
11+
"autoload": {
12+
"psr-4": {
13+
"WPT\\": "src/"
14+
}
15+
},
16+
"autoload-dev": {
17+
"psr-4": {
18+
"Tests\\": "tests/"
19+
}
20+
},
21+
"require": {
22+
"php": "^7.4"
23+
},
24+
"require-dev": {
25+
"phpunit/phpunit": "^5.0",
26+
"phpcompatibility/phpcompatibility-wp": "*",
27+
"wp-coding-standards/wpcs": "^2.3",
28+
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
29+
"squizlabs/php_codesniffer": "^3.5",
30+
"spatie/ray": "^1.3"
31+
},
32+
"scripts": {
33+
"refresh" : "git clean -xffd && composer install --ansi",
34+
"install-phpcs-rules" : "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run",
35+
"lint:php" : "./vendor/bin/phpcs ./ --extensions=php --ignore=vendor/,tests/",
36+
"fix:php" : "./vendor/bin/phpcbf ./inc && ./vendor/bin/phpcbf ./src",
37+
"test:php": "./vendor/bin/phpunit --colors=always tests",
38+
"test:php-testdox": "@test:php --testdox",
39+
"wp:install-tests": "bin/install-wp-tests.sh wordpress_unit_tests root 'root' 127.0.0.1:8889 latest true"
40+
}
41+
}

0 commit comments

Comments
 (0)