Skip to content

Commit

Permalink
Add new setup command for project cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
khleomix committed May 8, 2024
1 parent 7a1e6a2 commit 7757b6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ From the command line, type any of the following to perform an action:
| `npm run lint` | Check all CSS, JS, and MD files for errors |
| `npm run lint-php` | Check all PHP files for errors |
| `npm run report` | Gives detailed information on coding standards violations in PHP code |
| `npm run setup` | Cleans the project and then installs both Node.js and PHP dependencies. |
| `npm run start` | Builds assets and starts Live Reload server |

***
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,20 @@
"build": "cross-env NODE_ENV=production wp-scripts build --config webpack.prod.js",
"build:all": "composer install --quiet && composer run-script pot && npm run build",
"build:pot": "composer run-script pot",
"clean": "rm -rf node_modules && rm -rf vendor && rm -f package-lock.json && rm -f composer.lock",
"format": "run-p format:*",
"format-php": "composer run-script format-php",
"format:css": "npx prettier '**/*.scss' --write && npm run lint:css -- --fix",
"format:js": "wp-scripts format && npm run lint:js -- --fix",
"format-php": "composer run-script format-php",
"lint": "run-p lint:*",
"lint-php": "composer run-script lint-php",
"lint:css": "wp-scripts lint-style '**/*.scss'",
"lint:js": "wp-scripts lint-js",
"lint-php": "composer run-script lint-php",
"packages-update": "wp-scripts packages-update",
"postinstall": "npx lefthook install",
"preinstall": ". ~/.nvm/nvm.sh && nvm install && nvm use",
"report": "composer run-script report",
"setup": "npm run clean && npm i && composer i",
"start": "cross-env NODE_ENV=development wp-scripts start --config webpack.prod.js"
}
}

0 comments on commit 7757b6a

Please sign in to comment.