Skip to content

Instantly share code, notes, and snippets.

@alexdunae
Last active August 29, 2015 14:01
Show Gist options
  • Save alexdunae/8e1c1ca19c023865364c to your computer and use it in GitHub Desktop.
Save alexdunae/8e1c1ca19c023865364c to your computer and use it in GitHub Desktop.
Guard w/ WordPress
gzip_assets: off
javascript_compressor: uglifier
compressor_options:
copyright: true
beautify: false
javascripts:
www/wp-content/themes/slug/slug:
- www/wp-content/themes/slug/js/vendor/console.js
- www/wp-content/themes/slug/js/vendor/cookies.js
- www/wp-content/themes/slug/js/vendor/jquery.js
- www/wp-content/themes/slug/js/vendor/jquery-plugins/*.js
- www/wp-content/themes/slug/js/slug.js
#!/bin/sh
BASEDIR="www/wp-content/themes/yana"
USER="yana"
HOST="yanacomoxvalley.com"
rsync -rvzt --delete --delete-excluded --executability \
--exclude=.DS_Store \
--exclude=.svn \
--exclude=.git \
--exclude=css/ \
--exclude=*.coffee \
$BASEDIR $USER@$HOST:/home/yana/www/wp-content/themes/
scp $ROOTDIR/favicon.ico $USER@$HOST:/home/yana/www/
echo "Finished deploying to $HOST"
source 'https://rubygems.org/'
gem 'guard'
gem 'guard-jammit'
gem 'guard-sass'
gem 'guard-coffeescript'
guard :jammit, config_path: 'assets.yml', output_folder: '.' do
watch(%r{^(www/wp-content/themes/slug/js/.*)\.js$})
end
guard :sass, input: 'www/wp-content/themes/slug/css', output: 'www/wp-content/themes/slug', style: :compressed, smart_partials: true, all_on_start: true
guard :coffeescript, input: 'www/wp-content/themes/slug/js', all_on_start: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment