lib/tasks/haydetasks.rb in hayde-0.1.9 vs lib/tasks/haydetasks.rb in hayde-0.1.10

- old
+ new

@@ -3,34 +3,34 @@ CLOBBER.include('docs/guides') namespace :hayde do desc "Generates guides documentation." - task :build, [:output_dir, :assets_dir] do - guides_generator = Hayde::Generator.new do |g| - g.sources.include 'guides/source/**/*' - g.sources.exclude 'guides/source/layout.*' - g.output_dir = args.output_dir if args.output_dir - g.assets_dir = args.assets_dir if args.assets_dir - end - guides_generator.generate + task :build, [:output_dir, :assets_dir] do |t, args| + guides_generator = Hayde::Generator.new do |g| + g.sources.include 'guides/source/**/*' + g.sources.exclude 'guides/source/layout.*' + g.output_dir = args.output_dir if args.output_dir + g.assets_dir = args.assets_dir if args.assets_dir + end + guides_generator.generate end - desc "Generates guides documentation." - task :rebuild, [:output_dir, :assets_dir] do - guides_generator = Hayde::Generator.new do |g| - g.sources.include 'guides/source/**/*' - g.sources.exclude 'guides/source/layout.*' - g.output_dir = args.output_dir if args.output_dir - g.assets_dir = args.assets_dir if args.assets_dir - g.force = true - end - guides_generator.generate + desc "Generates guides documentation (force rebuild)." + task :rebuild, [:output_dir, :assets_dir] do |t, args| + guides_generator = Hayde::Generator.new do |g| + g.sources.include 'guides/source/**/*' + g.sources.exclude 'guides/source/layout.*' + g.output_dir = args.output_dir if args.output_dir + g.assets_dir = args.assets_dir if args.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 + guides_generator = Hayde::Generator.new + guides_generator.clean end end