Merge pull request #14739 from mauriciofauth/scripts

Add Composer and Yarn scripts
This commit is contained in:
Maurício Meneghini Fauth 2018-11-26 13:05:32 -02:00 committed by GitHub
commit 44b74a3b7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View File

@ -47,9 +47,9 @@ jobs:
after_success: skip
script:
- ./test/ci-phplint
- ./vendor/bin/phpcs --exclude=PSR1.Files.SideEffects,Generic.Metrics.NestingLevel
- ./node_modules/.bin/eslint --quiet ./js
- ./node_modules/.bin/stylelint "themes/**/scss/*.scss"
- composer phpcs
- yarn run js-lint --quiet
- yarn run css-lint
- stage: "Lint and analyse code"
name: "Run phpstan"
@ -57,7 +57,7 @@ jobs:
before_script: skip
after_script: skip
after_success: skip
script: ./vendor/bin/phpstan analyse
script: composer phpstan
- stage: "PHP Unit tests"
php: 7.1

View File

@ -92,5 +92,11 @@
"branch-alias": {
"dev-master": "5.0.x-dev"
}
},
"scripts": {
"phpcbf": "phpcbf",
"phpcs": "phpcs --exclude=PSR1.Files.SideEffects,Generic.Metrics.NestingLevel",
"phpstan": "phpstan analyse",
"test": "phpunit"
}
}

View File

@ -28,7 +28,9 @@
"stylelint-scss": "^3.4.0"
},
"scripts": {
"postinstall": "yarn run sass",
"sass": "sass themes/pmahomme/scss:themes/pmahomme/css themes/original/scss:themes/original/css themes/metro/scss:themes/metro/css"
"postinstall": "yarn run --silent css-compile --quiet --style=compressed",
"css-compile": "sass themes/pmahomme/scss:themes/pmahomme/css themes/original/scss:themes/original/css themes/metro/scss:themes/metro/css",
"css-lint": "stylelint --syntax scss \"themes/**/scss/*.scss\"",
"js-lint": "eslint js"
}
}