Sha256: ac3b40480c85f6f0d312dc58bd68d82d27d9ffa7b574f9454813639defc1bd73

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

require 'rake'
require 'rake/clean'

CLOBBER.include('docs/guides')

namespace :hayde do
  desc "Generates guides documentation."
  task :build, [:output_dir, :assets_dir] do |t, args|
    output_dir = args.output_dir
    assets_dir = args.assets_dir
	  guides_generator = Hayde::Generator.new do |g|
	    g.sources.include 'guides/source/**/*'
	    g.sources.exclude 'guides/source/layout.*'
	    g.output_dir = output_dir if output_dir
	    g.assets_dir = assets_dir if assets_dir
	  end
	  guides_generator.generate
  end

  desc "Generates guides documentation (force rebuild)."
  task :rebuild, [:output_dir, :assets_dir] do |t, args|
    output_dir = args.output_dir
    assets_dir = args.assets_dir
	  guides_generator = Hayde::Generator.new do |g|
	    g.sources.include 'guides/source/**/*'
	    g.sources.exclude 'guides/source/layout.*'
	    g.output_dir = output_dir if output_dir
	    g.assets_dir = assets_dir if assets_dir
	    g.force = true
	  end
	  guides_generator.generate
  end

  desc "Removes generated guides."
  task :clean do
	  guides_generator = Hayde::Generator.new
	  guides_generator.clean
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hayde-0.1.11 lib/tasks/haydetasks.rb