Sha256: 235fe802fc90aff259fd0a2e373e650dca50704fc9ebb5fbdf4ab05f25042323

Contents?: true

Size: 1.08 KB

Versions: 19

Compression:

Stored size: 1.08 KB

Contents

# -*- ruby -*-
#
# This is a sample Rakefile to which you can add tasks to manage your website. For example, users
# may use this file for specifying an upload task for their website (copying the output to a server
# via rsync, ftp, scp, ...).
#
# It also provides some tasks out of the box, for example, rendering the website, clobbering the
# generated files, an auto render task,...
#

require 'webgen/webgentask'

task :default => :webgen

Webgen::WebgenTask.new do |website|
  website.clobber_outdir = true
  website.config_block = lambda do |config|
    # you can set configuration options here
  end
end

desc "Render the website automatically on changes"
task :auto_webgen do
  puts 'Starting auto-render mode'
  time = Time.now
  abort = false
  old_paths = []
  Signal.trap('INT') {abort = true}

  while !abort
    # you may need to adjust the glob so that all your sources are included
    paths = Dir['src/**/*'].sort
    if old_paths != paths || paths.any? {|p| File.mtime(p) > time}
      Rake::Task['webgen'].execute({})
    end
    time = Time.now
    old_paths = paths
    sleep 2
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
gettalong-webgen-0.5.4.20080929 data/webgen/website_skeleton/Rakefile
gettalong-webgen-0.5.5.20081001 data/webgen/website_skeleton/Rakefile
gettalong-webgen-0.5.5.20081010 data/webgen/website_skeleton/Rakefile
gettalong-webgen-0.5.5.20081012 data/webgen/website_skeleton/Rakefile
gettalong-webgen-0.5.6.20081020 data/webgen/website_skeleton/Rakefile
gettalong-webgen-0.5.7.20090227 data/webgen/website_skeleton/Rakefile
gettalong-webgen-0.5.8.20090507 data/webgen/website_skeleton/Rakefile
gettalong-webgen-0.5.9.20090620 data/webgen/website_skeleton/Rakefile
gettalong-webgen-0.5.9.20090626 data/webgen/website_skeleton/Rakefile
thewoolleyman-webgen-0.5.8.20090419 data/webgen/website_skeleton/Rakefile
webgen-0.5.0 data/webgen/website_skeleton/Rakefile
webgen-0.5.2 data/webgen/website_skeleton/Rakefile
webgen-0.5.4 data/webgen/website_skeleton/Rakefile
webgen-0.5.1 data/webgen/website_skeleton/Rakefile
webgen-0.5.3 data/webgen/website_skeleton/Rakefile
webgen-0.5.7 data/webgen/website_skeleton/Rakefile
webgen-0.5.5 data/webgen/website_skeleton/Rakefile
webgen-0.5.6 data/webgen/website_skeleton/Rakefile
webgen-0.5.8 data/webgen/website_skeleton/Rakefile