This repository was archived by the owner on Nov 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +61
-103
lines changed Expand file tree Collapse file tree 5 files changed +61
-103
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # NPM: PHP Coding Standards (Fix)
4+ #
5+ # These are a little too cumbersome to deal with inside NPM.
6+ # #
7+
8+
9+
10+ # Check dependencies.
11+ if [ ! -e " ./node_modules/blobfolio-phpcs/lib/vendor/bin/phpcbf" ]; then
12+ echo -e " \033[31;1mError:\033[0m blobfolio-phpcs is required."
13+ echo -e
" \033[96;1mFix:\033[0m npm i git+ssh://[email protected] :3417/blobfolio-phpcs" 14+ exit 1
15+ fi
16+
17+
18+
19+ # This is just one command, but it is a bitch.
20+ ./node_modules/blobfolio-phpcs/lib/vendor/bin/phpcbf --colors --standard=Blobfolio --encoding=utf8 --extensions=php --parallel=4 ./
21+
22+
23+
24+ exit 0
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # NPM: PHP Coding Standards
4+ #
5+ # These are a little too cumbersome to deal with inside NPM.
6+ # #
7+
8+
9+
10+ # Check dependencies.
11+ if [ ! -e " ./node_modules/blobfolio-phpcs/lib/vendor/bin/phpcs" ]; then
12+ echo -e " \033[31;1mError:\033[0m blobfolio-phpcs is required."
13+ echo -e
" \033[96;1mFix:\033[0m npm i git+ssh://[email protected] :3417/blobfolio-phpcs" 14+ exit 1
15+ fi
16+
17+
18+
19+ ./node_modules/blobfolio-phpcs/lib/vendor/bin/phpcs --colors --standard=Blobfolio --encoding=utf8 --report=full --extensions=php --parallel=4 ./
20+ if [ $? -eq 0 ]; then
21+ # Everything was fine; just log to the terminal and exit.
22+ echo -e " \033[32;1mSuccess:\033[0m Your PHP is looking good!"
23+ else
24+ # Try one more time without warnings to see if this is bad or not.
25+ ./node_modules/blobfolio-phpcs/lib/vendor/bin/phpcs --colors --standard=Blobfolio --encoding=utf8 --report=notifysend --extensions=php --parallel=4 ./
26+ fi
27+
28+
29+
30+ exit 0
Original file line number Diff line number Diff line change 11{
22 "name" : " blob-domain" ,
33 "devDependencies" : {
4- "grunt" : " *" ,
5- "grunt-contrib-clean" : " *" ,
6- "grunt-contrib-watch" : " *" ,
7- "grunt-notify" : " *" ,
8- "grunt-blobfolio" :
" git+ssh://[email protected] :3417/grunt-blobfolio" 4+ "blobfolio-phpcs" :
" git+ssh://[email protected] :3417/blobfolio-phpcs" 5+ },
6+ "scripts" : {
7+ "preinstall" : " npm list onchange -g || npm install onchange -g" ,
8+ "watch" : " onchange '*.php' '**/*.php' -- npm run -s php" ,
9+ "php" : " npm_scripts/php.sh" ,
10+ "php:fix" : " npm_scripts/php-fix.sh"
911 }
1012}
You can’t perform that action at this time.
0 commit comments