diff --git a/.travis.yml b/.travis.yml index b0ccda54d..485414c90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: - composer install script: - - composer run-script ci-php-phpcs + - composer run-script ci:php:phpcs - # see https://docs.travis-ci.com/user/languages/javascript-with-nodejs/ for more hints @@ -33,5 +33,5 @@ matrix: - npm ci script: - - npm run ci-js-eslint - - npm run ci-css-stylelint + - npm run ci:js:eslint + - npm run ci:css:stylelint diff --git a/README.md b/README.md index 5290b169a..eaa6931c5 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ OGame-clone browser based game engine. ### Available scripts - Run PHP code linting (powered by PHP Code Sniffer) - - ``composer run-script ci-php-phpcs`` + - ``composer run-script ci:php:phpcs`` - Run all not-yet-applied migrations - ``composer run-script migrate:run [-- --confirm-manual-action]`` - Script will automatically apply all outstanding migrations. @@ -91,11 +91,11 @@ OGame-clone browser based game engine. - ``composer run-script migrate:make -- <MIGRATION_FILE_NAME>`` - New migration file with autogenerated ID (date) will be created in ``utils/migrator/migrations/`` directory. - Run JavaScript code linting (powered by ESLint): - - ``npm run ci-js-eslint`` + - ``npm run ci:js:eslint`` - Run CSS code linting (powered by stylelint): - - ``npm run ci-css-stylelint`` + - ``npm run ci:css:stylelint`` - Rebuild (minification + cachebusting) JS & CSS files: - - ``npm run build-minify`` + - ``npm run build:minify`` - All files from ``js/`` and ``css/`` directories will be re-minified (only when actually changed) and saved in their respective ``dist/`` directories. - _Note:_ when a file has no changes, this script **won't** remove the old minified & cachebusted file from ``dist/``. File replacement happens only if a source file has changes, or there is no result file yet. - _Note:_ this script does **not** automatically replace filepaths in templates. For now, this has to be done manually by a developer. diff --git a/composer.json b/composer.json index b05f5556f..f32e755b2 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "scripts": { "migrate:run": "php ./utils/migrator/entry.php migrate:run", "migrate:make": "php ./utils/migrator/entry.php migrate:make", - "ci-php-lint": "find . -not \\( -path ./action_logs -prune \\) -not \\( -path ./cache -prune \\) -not \\( -path ./tmp -prune \\) -not \\( -path ./vendor -prune \\) -name '*.php' -print0 | xargs -0 -n1 php -l", - "ci-php-phpcs": "phpcs ./ --standard=phpcs.xml --extensions=php" + "ci:php:lint": "find . -not \\( -path ./action_logs -prune \\) -not \\( -path ./cache -prune \\) -not \\( -path ./tmp -prune \\) -not \\( -path ./vendor -prune \\) -name '*.php' -print0 | xargs -0 -n1 php -l", + "ci:php:phpcs": "phpcs ./ --standard=phpcs.xml --extensions=php" } } diff --git a/package.json b/package.json index c85b1f426..385d45478 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "description": "OGame-like Game Engine", "main": "", "scripts": { - "ci-js-eslint": "eslint --quiet ./", - "ci-css-stylelint": "stylelint \"./**/*.css\"", - "build-minify": "gulp" + "ci:js:eslint": "eslint --quiet ./", + "ci:css:stylelint": "stylelint \"./**/*.css\"", + "build:minify": "gulp" }, "repository": { "type": "git",