Sha256: 7d491f47dba9bb9171e46d5890169142a4a188ecdb8857f3288adf45f18b83f0

Contents?: true

Size: 642 Bytes

Versions: 3

Compression:

Stored size: 642 Bytes

Contents

# frozen_string_literal: true

require 'wax_tasks'

namespace :wax do
  desc 'build lunr search index (with default UI if UI=true)'
  task :search do
    args = ARGV.drop(1).each { |a| task a.to_sym }
    raise WaxTasks::Error::MissingArguments, Rainbow('You must specify a collection after wax:search').magenta if args.empty?

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

  # alias lunr to search for backwards compatibility
  task :lunr do
    t = Rake::Task['wax:search']
    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/search.rake
wax_tasks-1.0.1 lib/tasks/search.rake
wax_tasks-1.0.0 lib/tasks/search.rake