Download the PHP package nickwilde1990/drupal-standards-composer-commands without Composer
On this page you can find all versions of the php package nickwilde1990/drupal-standards-composer-commands. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nickwilde1990/drupal-standards-composer-commands
More information about nickwilde1990/drupal-standards-composer-commands
Files in nickwilde1990/drupal-standards-composer-commands
Package drupal-standards-composer-commands
Short Description Provides composer commands for standards checks on your Drupal project
License GPL-3.0-or-later
Informations about the package drupal-standards-composer-commands
Drupal Standards Composer Commands
Table Of Contents
- Introduction
- Installation
- Basic Usage
- Configuration
- Known Issues
- Contributing
- Licence
Introduction
Provides composer commands to check your project according to Drupal Standards.
Sets up all the requirements for basic standards checks. If you have them, this
will use phpcs.xml
and similar depending on the specific tool if available to
use your customized standards or will use Drupal 8 defaults.
Installation
Install through Composer. Due to the status of some of
the dependencies, you will need to have "minimum-stability": "dev"
in your
composer config. When using that, in most cases, it is recommended to also use
"prefer-stable": true
.
Usage
Run
Note: Unless/Until this pull request
lands in composer, you will
need to run any command provided by this in your project root (same location as
your composer.json
).
Available Commands
-
drupal-eslint
[cs-js-scan
]: Runs Eslint on your code (check JS standards). Will use default Drupal 8 standards if you do not have a.eslintrc.json
. -
drupal-eslint-fix
[cs-js-fix
]: Runs Eslint fix mode on your code (automatically fix JS standards compliance issues). Will use default Drupal 8 standards if you do not have a.eslintrc.json
. -
drupal-phpcs
[cs-php-scan
]: Runs PHPCS on your code (check PHP standards). Will use standard Drupal 8 mode if you do not have aphpcs.xml
orphpcs.xml.dist
. -
drupal-phpcbf
[cs-php-fix
]: Runs PHPCBF on your code (automatically fix many PHP standards complaince issues). Will use standard Drupal 8 mode if you do not have aphpcs.xml
orphpcs.xml.dist
. -
drupal-stylelint
[cs-css-scan
]: Runs Stylelint on your code (check CSS standards). Will use default Drupal 8 standards if you do not have a.stylelintrc.json
. drupal-stylelint-fix
[cs-css-fix
]: Runs Stylelint fix mode on your code (automatically fix CSS standards compliance issues). Will use default Drupal 8 standards if you do not have a.stylelintrc.json
.
Configuration
Some custom configuration can be provided in your package's composer.json
in
the extra
key under drupal-standards-commands
. Specifically:
ignore-paths
: Provide an array of extra paths for tools to ignore (affects all scan/fix tools). Default:["core"]
Example:
Known issues
See open bug reports in the issue queue
Contribution
Contributions are welcome!
License
Copyright (C) 2018 Nick Wilde.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/
All versions of drupal-standards-composer-commands with dependencies
drupal/coder Version ^8.2.12
dealerdirect/phpcodesniffer-composer-installer Version ^0.4.4
composer-plugin-api Version ^1.1
mouf/nodejs-installer Version ^1.0