Skip to content

Commit edc53f2

Browse files
authored
Merge pull request #915 from woocommerce/feature/pre-commit
Introduces pre-commit hook
2 parents be958c8 + b978034 commit edc53f2

File tree

4 files changed

+1986
-23
lines changed

4 files changed

+1986
-23
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@ config.codekit
2828
.DS_Store
2929

3030
# Composer
31-
composer.lock
3231
/vendor

composer.json

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,49 @@
1-
{
2-
"name":"woocommerce/storefront",
3-
"description":"Storefront is a robust and flexible WordPress theme, designed and built by the team at WooCommerce to help you make the most out of using the WooCommerce plugin to power your online store. It's available to download for free from the WordPress theme repository.",
4-
"homepage":"https://woocommerce.com/",
5-
"type":"wordpress-theme",
6-
"license":"GPL-2.0+",
7-
"require":{
8-
"composer/installers":"~1.2"
9-
},
10-
"require-dev":{
11-
"squizlabs/php_codesniffer":"*",
12-
"wp-coding-standards/wpcs":"0.10.0",
13-
"phpunit/phpunit":"6.2.3"
14-
},
15-
"scripts":{
16-
"post-install-cmd":[
17-
"\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs"
18-
],
19-
"post-update-cmd":[
20-
"\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs"
21-
]
22-
}
1+
{
2+
"name": "woocommerce/storefront",
3+
"description": "Storefront is a robust and flexible WordPress theme, designed and built by the team at WooCommerce to help you make the most out of using the WooCommerce plugin to power your online store. It's available to download for free from the WordPress theme repository.",
4+
"homepage": "https://woocommerce.com/",
5+
"type": "wordpress-theme",
6+
"license": "GPL-2.0+",
7+
"require": {
8+
"composer/installers": "~1.2"
9+
},
10+
"require-dev": {
11+
"squizlabs/php_codesniffer": "*",
12+
"wp-coding-standards/wpcs": "^0.14",
13+
"phpunit/phpunit": "6.*",
14+
"woocommerce/woocommerce-git-hooks": "*",
15+
"woocommerce/woocommerce-sniffs": "*",
16+
"wimg/php-compatibility": "^8.0",
17+
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
18+
},
19+
"scripts": {
20+
"pre-update-cmd": [
21+
"WooCommerce\\GitHooks\\Hooks::preHooks"
22+
],
23+
"pre-install-cmd": [
24+
"WooCommerce\\GitHooks\\Hooks::preHooks"
25+
],
26+
"post-install-cmd": [
27+
"WooCommerce\\GitHooks\\Hooks::postHooks"
28+
],
29+
"post-update-cmd": [
30+
"WooCommerce\\GitHooks\\Hooks::postHooks"
31+
],
32+
"test": [
33+
"phpunit"
34+
],
35+
"phpcs": [
36+
"phpcs -s -p"
37+
],
38+
"phpcbf": [
39+
"phpcbf -p"
40+
]
41+
},
42+
"extra": {
43+
"scripts-description": {
44+
"test": "Run unit tests",
45+
"phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer",
46+
"phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier"
47+
}
48+
}
2349
}

0 commit comments

Comments
 (0)