Skip to content

Commit

Permalink
Simplify composer scripts (#5183)
Browse files Browse the repository at this point in the history
Composer automatically adds to the PATH variable the concrete/vendor/bin
directory, so we can call the scripts in it without specifying the folder.

This also implies that we can avoid duplicating script definitions for posix
and Windows.
  • Loading branch information
mlocati authored and KorvinSzanto committed Mar 8, 2017
1 parent bb65942 commit 78af2da
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,10 @@
}
},
"scripts": {
"test": "./concrete/vendor/bin/phpunit",
"test": "phpunit",
"phpcs": [
"./concrete/vendor/bin/phpcs -p -s --colors --report=full --standard=psr2 --sniffs=Generic.WhiteSpace.DisallowTabIndent,Generic.PHP.DisallowShortOpenTag concrete/src concrete/controllers",
"./concrete/vendor/bin/phpcs -p -s --colors --report=full --standard=psr2 --sniffs=Generic.PHP.DisallowShortOpenTag --ignore=\"*.js,*.css,*.less,concrete/vendor/*,concrete/src/*,concrete/controllers/*\" concrete"
],
"phpcsw": [
".\\concrete\\vendor\\bin\\phpcs -p -s --report=full --standard=psr2 --sniffs=Generic.WhiteSpace.DisallowTabIndent,Generic.PHP.DisallowShortOpenTag concrete/src concrete/controllers",
".\\concrete\\vendor\\bin\\phpcs -p -s --report=full --standard=psr2 --sniffs=Generic.PHP.DisallowShortOpenTag --ignore=\"*.js,*.css,*.less,concrete/vendor/*,concrete/src/*,concrete/controllers/*\" concrete"
"phpcs -p -s --report=full --standard=psr2 --sniffs=Generic.WhiteSpace.DisallowTabIndent,Generic.PHP.DisallowShortOpenTag concrete/src concrete/controllers",
"phpcs -p -s --report=full --standard=psr2 --sniffs=Generic.PHP.DisallowShortOpenTag --ignore=\"*.js,*.css,*.less,concrete/vendor/*,concrete/src/*,concrete/controllers/*\" concrete"
],
"post-create-project-cmd": [
"composer config --unset platform.php"
Expand Down

0 comments on commit 78af2da

Please sign in to comment.