Skip to content

Commit

Permalink
Removed Livereload support.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Feb 17, 2024
1 parent 21924bd commit cd81d9f
Show file tree
Hide file tree
Showing 12 changed files with 4,537 additions and 174 deletions.
5 changes: 1 addition & 4 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ commands:
usage: Build and start Docker containers.
cmd: |
docker compose up -d "$@" && if docker compose logs | grep -q "\[Error\]"; then exit 1; fi
docker compose port cli 35729 | cut -d : -f 2 | xargs -I{} ahoy cli 'echo {} > /app/${DREVOPS_WEBROOT}/sites/default/files/livereload.sock'
down:
usage: Stop Docker containers and remove container, images, volumes and networks.
Expand All @@ -63,9 +62,7 @@ commands:
start:
usage: Start existing Docker containers.
cmd: |
docker compose start "$@"
docker compose port cli 35729 | cut -d : -f 2 | xargs -I{} ahoy cli 'echo {} > /app/${DREVOPS_WEBROOT}/sites/default/files/livereload.sock'
cmd: docker compose start "$@"

stop:
usage: Stop running Docker containers.
Expand Down
1 change: 0 additions & 1 deletion .drevops/docs/.utils/.aspell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ JUnit
Jira
Kanban
Lando
Livereload
MAMP
Mailhog
Mysql
Expand Down
7 changes: 0 additions & 7 deletions .drevops/tests/bats/fixtures/docker-compose.env.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,6 @@
"networks": {
"default": null
},
"ports": [
{
"mode": "ingress",
"protocol": "tcp",
"target": 35729
}
],
"user": "root",
"volumes": [
{
Expand Down
7 changes: 0 additions & 7 deletions .drevops/tests/bats/fixtures/docker-compose.env_mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,6 @@
"networks": {
"default": null
},
"ports": [
{
"mode": "ingress",
"protocol": "tcp",
"target": 35729
}
],
"user": "root",
"volumes": [
{
Expand Down
7 changes: 0 additions & 7 deletions .drevops/tests/bats/fixtures/docker-compose.noenv.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,6 @@
"networks": {
"default": null
},
"ports": [
{
"mode": "ingress",
"protocol": "tcp",
"target": 35729
}
],
"user": "root",
"volumes": [
{
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ services:
# Mount volumes from the ssh-agent running in Pygmy to inject host SSH key into container. See https://pygmy.readthedocs.io/en/master/ssh_agent/
volumes_from: ### Local overrides to mount host SSH keys. Automatically removed in CI.
- container:amazeeio-ssh-agent ### Local overrides to mount host SSH keys. Automatically removed in CI.
ports:
- "35729" # Livereload port in container. Find port on host with `ahoy info` or `docker compose port cli 35729`.
#;< LAGOON
labels:
lagoon.type: cli-persistent # See https://docs.lagoon.sh/using-lagoon-advanced/service-types/
Expand Down
8 changes: 0 additions & 8 deletions docs/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,3 @@ composer require drupal/module_name
```bash
composer update --lock`
```

## How to run Livereload?

1. If `settings.local.php` does not exist, copy `default.settings.local.php`
to `settings.local.php`
2. Set `$settings['livereload'] = TRUE;` in `settings.local.php` file
3. Clear drupal cache: `ahoy drush cr`
4. Run: `ahoy few`
2 changes: 0 additions & 2 deletions scripts/drevops/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ if [ -n "${DRUPAL_THEME:-}" ] && [ -z "${CI:-}" ]; then
docker compose exec ${dcopts[@]} cli bash -c 'cd ${DREVOPS_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run build' >"${npm_verbose_output}"
pass "Compiled front-end dependencies."

docker compose port cli 35729 | cut -d : -f 2 | xargs -I{} docker compose exec ${dcopts[@]} cli bash -c 'echo {} > /app/${DREVOPS_WEBROOT}/sites/default/files/livereload.sock'
pass "Created Livereload socket."
echo
fi
# LCOV_EXCL_STOP
Expand Down
3 changes: 0 additions & 3 deletions web/sites/default/default.settings.local.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,5 @@
// Disable JavaScript files aggregation.
$config['system.performance']['js']['preprocess'] = FALSE;

// Enable Livereload.
$settings['livereload'] = TRUE;

// Hide admin toolbar. Useful for themeing while logged in as admin.
// $settings['hide_admin_toolbar'] = TRUE;
2 changes: 0 additions & 2 deletions web/themes/custom/your_site_theme/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ module.exports = function (grunt) {
files: ['js/**/*.js'],
tasks: ['concat'],
options: {
livereload: true,
spawn: false
}
},
Expand All @@ -141,7 +140,6 @@ module.exports = function (grunt) {
],
tasks: ['sass_globbing', 'sass:dev', 'postcss:dev'],
options: {
livereload: true,
spawn: false
}
}
Expand Down
Loading

0 comments on commit cd81d9f

Please sign in to comment.