Skip to content

Commit

Permalink
Merge branch 'release/2.4.31' into craft-webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Apr 5, 2021
2 parents bb1a1c3 + 87dea22 commit f73706f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# nystudio107/craft Change Log

## 2.4.31 - 2021.04.05
### Added
* Added `make update` to update Composer & NPM packages
* Added `make update-clean` to completely remove `vendor/` and `node_modules/`, then update Composer & NPM packages

## 2.4.30 - 2021.04.05
### Fixed
* Fixed `make up` command by removing an errant `$`
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ pulldb: up
restoredb: up
cd scripts/ && ./docker_restore_db.sh \
$(filter-out $@,$(MAKECMDGOALS))
update:
docker-compose down
rm cms/composer.lock
rm buildchain/package-lock.json
docker-compose up
update-clean:
docker-compose down
rm cms/composer.lock
rm -rf cms/vendor/
rm buildchain/package-lock.json
rm -rf buildchain/node_modules/
docker-compose up
up:
if [ ! "$$(docker ps -q -f name=${CONTAINER})" ]; then \
docker-compose up; \
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,23 @@ To make using it easier, we're using a Makefile and the built-in `make` utility
- `make dev` - starts up the local dev server listening on `http://localhost:8000/`
- `make build` - builds the static assets via the webpack 5 buildchain
- `make clean` - shuts down the Docker containers, removes any mounted volumes (including the database), and then rebuilds the containers from scratch
- `make update` - causes the project to update to the latest Composer and NPM dependencies
- `make update-clean` - completely removes `node_modules/` & `vendor/`, then causes the project to update to the latest Composer and NPM dependencies
- `make composer xxx` - runs the `composer` command passed in, e.g. `make composer install`
- `make npm xxx` - runs the `npm` command passed in, e.g. `make npm install`
- `make pulldb` - runs the `scripts/docker_pull_db.sh` script to pull a remote database into the database container; the `scripts/.env.sh` must be set up first
- `make restoredb xxx` - runs the `scripts/docker_restore_db.sh` script to restore a local database dump into the database container; the `scripts/.env.sh` must be set up first

### Other notes

To update to the latest Composer packages (as constrained by the `cms/composer.json` semvers), do:
To update to the latest Composer packages (as constrained by the `cms/composer.json` semvers) and latest npm packages (as constrained by the `docker-config/webpack-dev-devmode/package.json` semvers), do:
```
rm cms/composer.lock
make dev
make update
```

To update to the latest npm packages (as constrained by the `buildchain/package.json` semvers), do:
To start from scratch by removing `buildchain/node_modules/` & `cms/vendor/`, then update to the latest Composer packages (as constrained by the `cms/composer.json` semvers) and latest npm packages (as constrained by the `docker-config/webpack-dev-devmode/package.json` semvers), do:
```
rm buildchain/package-lock.json
make dev
make update-clean
```

To use Xdebug with VSCode install the [PHP Debug extension](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug ) and use the following configuration in your `.vscode/launch.json`:
Expand Down

0 comments on commit f73706f

Please sign in to comment.