Sha256: 070ebdfc62a839efe32d42e4880741182ef71562d09187290fd145cc69011e7c

Contents?: true

Size: 652 Bytes

Versions: 3

Compression:

Stored size: 652 Bytes

Contents

# frozen_string_literal: true

require 'wax_tasks'

namespace :wax do
  desc 'generate collection md pages from yaml or csv data source'
  task :pages do
    args = ARGV.drop(1).each { |a| task a.to_sym }
    raise WaxTasks::Error::MissingArguments, Rainbow('You must specify a collection after wax:pages').magenta if args.empty?

    site = WaxTasks::Site.new
    args.each { |a| site.generate_pages a }
  end

  # alias :pagemaster to wax:pages for backwards compatibility
  task :pagemaster do
    t = Rake::Task['wax:pages']
    desc t.full_comment if t.full_comment
    args = ARGV.drop(1).each { |a| task a.to_sym }
    t.invoke(*args)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wax_tasks-1.0.2 lib/tasks/pages.rake
wax_tasks-1.0.1 lib/tasks/pages.rake
wax_tasks-1.0.0 lib/tasks/pages.rake