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
/* | |
Gruntfile for Pattern Lab + Compass + LiveReload | |
This is a sample Gruntfile for integrating Pattern Lab's template | |
regeneration with Compass and LiveReload. | |
I've found that using the Chrome LiveReload extension is slow as it | |
forces a full-page browser reload instead of using CSS injection. This | |
Gruntfile setup seems to work great, though, if you use the LiveReload | |
JS snippet instead. Just add this script right before the closing |
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
/* | |
Gruntfile for Pattern Lab + Compass + Live Reload via grunt-browser-sync | |
Set up to use browser-sync because for the life of me I can't get | |
the grunt-contrib-watch livereload to *inject* the compiled CSS changes | |
to the browser (as opposed to livereload doing a full page refresh)... | |
(To be clear, the CSS injection I'm talking about is where changes to | |
the CSS file are slipped in to the browser very quickly with no | |
full page reload, and without losing your place if you've scrolled |
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
#!/bin/bash | |
DIRECTORY="/www/$1" | |
DIR_CREATED=false | |
HOSTS_EDITED=false | |
if [ -d "$DIRECTORY" ]; then | |
echo "* Directory $DIRECTORY already exists, skipping this step." | |
else | |
mkdir $DIRECTORY | |
DIR_CREATED=true |