Created
May 14, 2014 19:10
-
-
Save mikeyp/62ac8738b1402691147d to your computer and use it in GitHub Desktop.
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
source "http://rubygems.org" | |
# Gems | |
gem 'nanoc' | |
gem 'adsf' | |
gem 'kramdown' | |
gem 'compass' | |
# Guard support | |
gem 'guard' | |
gem 'guard-nanoc' | |
gem 'guard-shell' | |
gem 'guard-livereload' | |
gem 'guard-webrick', :github => 'mikemcquaid/guard-webrick', :branch => 'support-newer-guard' |
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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
guard 'nanoc' do | |
watch('nanoc.yaml') # Change this to config.yaml if you use the old config file name | |
watch('Rules') | |
watch(%r{^(content|layouts|lib)/.*$}) | |
end | |
guard 'webrick', :host => '127.0.0.1', :port => '3333', :docroot => 'output' do | |
end | |
guard 'livereload' do | |
watch(%r{output/.+\.(css|js|html)}) | |
end | |
# Add files and commands to this file, like the example: | |
# watch(%r{file/path}) { `command(s)` } | |
guard :shell, all_on_start: true do | |
watch(/.*\.scss$/) do |m| | |
`sassc -l lib/sass/style.scss > content/css/style.css` | |
end | |
end |
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
task :default => :guard | |
task :build do | |
bundle 'sassc -t compressed lib/sass/style.scss > content/css/style.css' | |
bundle 'nanoc' | |
end | |
desc 'Start guard' | |
task :guard do | |
bundle 'guard' | |
end | |
def bundle(opts = '') | |
sh 'bundle exec ' + opts | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment