Skip to content

Instantly share code, notes, and snippets.

@kevinweber
Last active August 12, 2016 20:22
Show Gist options
  • Save kevinweber/6a8ce66effd864315fb4ce9a8ef7752f to your computer and use it in GitHub Desktop.
Save kevinweber/6a8ce66effd864315fb4ce9a8ef7752f to your computer and use it in GitHub Desktop.
Browsersync that works with AEM. UPDATE: Use the AEM Front solution instead: https://github.com/kevinweber/aem-front
#! /bin/bash
# https://www.npmjs.com/package/browser-sync
# Documentation: https://browsersync.io/docs/command-line
# Usage: Run `$ sh browsersync.sh` in your terminal from the folder where this script is located.
# Use this script together with https://github.com/kevinweber/aem-front-extension
if ! type "browser-sync" > /dev/null;
then
echo "browser-sync is not installed. Installing..."
sudo npm install browser-sync -g
fi
DIR="./directory/**/jcr_root/**"
browser-sync start --files "$DIR/*.css" "$DIR/*.less" "$DIR/*.html" "$DIR/*.js" "$DIR/*.xml" --reload-delay 500 --no-inject-changes --no-ui --no-open --no-notify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment