Skip to content

Commit

Permalink
File monitoring configuration
Browse files Browse the repository at this point in the history
File monitoring configuration with guard and asciidoctor (+bundler config file for downloading required gems).
Added stylesheets for local document preview. Updated .gitignore.
  • Loading branch information
gAmUssA committed Apr 11, 2013
1 parent 1c20b18 commit ec6fbd4
Show file tree
Hide file tree
Showing 6 changed files with 1,633 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.preview*
.metadata*
.metadata*
ch*.html
Gemfile.lock
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
source 'https://rubygems.org'

gem 'guard'
gem 'guard-shell'
# gem 'rb-inotify' - linux
gem 'rb-fsevent' # mac os x
gem 'asciidoctor'
gem 'guard-livereload'
gem 'yajl-ruby'
23 changes: 23 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require 'asciidoctor'
require 'erb'

guard 'shell' do
watch(/.*\.asciidoc$/) {|m|
Asciidoctor.render_file(m[0],
:in_place => true,
:safe =>10,
:attributes => {
'source-highlighter' => 'highlightjs',
'backend' => 'html5',
'stylesheet'=> './stylesheets/riak.css'
#'stylesheet'=> './stylesheets/asciidoctor.css'
#'stylesheet'=> './stylesheets/foundation.css'
})
}
end

# uncomment this 3 lines to use LiveReload
# Chrome extension http://goo.gl/wNPKB
#guard 'livereload' do
# watch(%r{^.+\.(css|js|html)$})
#end
Loading

0 comments on commit ec6fbd4

Please sign in to comment.