Skip to content

Commit

Permalink
GH-91 Improve namespacing for scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Mar 25, 2020
1 parent 32c5dfa commit a55b10f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a55b10f

Please sign in to comment.