generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from rfay/20220529_simplified_browsersync
- Loading branch information
Showing
10 changed files
with
102 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// #ddev-generated | ||
let docroot = process.env.DDEV_DOCROOT; | ||
let filesdir = process.env.DDEV_FILES_DIR; | ||
let url = process.env.DDEV_HOSTNAME; | ||
|
||
if (filesdir === "") { | ||
filesdir = null | ||
} | ||
|
||
module.exports = { | ||
|
||
files: [docroot], | ||
ignore: ["node_modules", filesdir, "vendor"], | ||
open: false, | ||
ui: false, | ||
server: false, | ||
proxy: { | ||
target: "localhost" | ||
}, | ||
host: url, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
## Description: Run browser-sync in the web container | ||
## Usage: browsersync | ||
## Example: "ddev browsersync" | ||
## ExecRaw: true | ||
|
||
browser-sync start -c .ddev/browser-sync.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
name: ddev-browsersync | ||
|
||
# pre_install_actions - list of actions to run before installing the addon. | ||
# Examples would be removing an extraneous docker volume, | ||
# or doing a sanity check for requirements. | ||
pre_install_actions: | ||
# - 'if [ "$(arch)" = "arm64" -o "$(arch)" = "aarch64" ]; then echo "This package does not work on arm64 machines"; exit 1; fi' | ||
# - "docker volume rm ddev-${DDEV_PROJECT}_solr 2>/dev/null || true" | ||
- | | ||
if ! ( ddev debug capabilities 2>/dev/null | grep multiple-dockerfiles >/dev/null 2>&1 ) ; then | ||
echo "This add-on requires DDEV v1.19.3 or higher, please upgrade." && exit 2 | ||
fi | ||
# list of files and directories listed that are copied into project .ddev directory | ||
project_files: | ||
- docker-compose.browsersync.yaml | ||
# - extra_files/ | ||
# - somefile.sh | ||
- docker-compose.browsersync.yaml | ||
- web-build | ||
- browser-sync.js | ||
|
||
|
||
# List of files and directories that are copied into the global .ddev directory | ||
global_files: | ||
# - commands | ||
# - homeadditions | ||
- commands | ||
|
||
|
||
post_install_actions: | ||
# - chmod +x ~/.ddev/commands/web/somecommand | ||
# - perl -pi -e 's/oldstring/newstring/g' docker-compose.addon-template.yaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/expect -f | ||
|
||
set PROJNAME $::env(PROJNAME) | ||
set timeout -1 | ||
|
||
spawn ddev browsersync | ||
expect "http://${PROJNAME}.ddev.site:3000" | ||
|
||
expect "wait forever" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#ddev-generated | ||
RUN npm install -g browser-sync |