Dependency Management

The script buildfresh.sh installs dependencies, performs cleanup, and compiles the base SCSS and JS.

Buildfresh.sh

  • Runs: composer install

  • Runs: yarn

  • Moves: /app/core/wp-content/ to /app/lib/wp-content/

  • Runs: npm run dev

To Run buildfresh.sh:

  • In a terminal, from your project root, enter the PHP container's shell by running: docker exec -ti COMPOSE_PROJECT_NAME-php bash

  • From /var/www/html run ./buildfresh.sh Windows Note‚Äč

To Remove and reinstall all dependencies

  • Open ./buildfresh.sh

  • Uncomment the line rm -rf vendor/ node_modules/ app/core/ /composer.lock /yarn.lock -v && and save.

  • Run ./buildfresh.sh

Windows Users: if you encounter an error while running the buildfresh script:

  1. Open buildfresh.sh in your text editor

  2. Set the line endings to LF

  3. Re-run buildfresh.sh

  4. IF the error persists:

  5. From the PHP container at /var/www/html run chmod + x ./buildfresh.sh

  6. Re-run ./buildfresh.sh