Sha256: d06ffb84bcd9034490ffb7113808a62e9f14812235c4b207daed13069464a878

Contents?: true

Size: 1.04 KB

Versions: 188

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

require "ariadne/view_components/commands"

namespace :ariadne_view_components do
  desc "Build Ariadne View Components CSS"
  task :build do |_, args|
    debug = args.extras.include?("debug")
    command = Ariadne::ViewComponents::Commands.compile_command(debug: debug)
    puts command.inspect
    system(*command, exception: true)
  end

  desc "Watch and build Ariadne View Components CSS on file changes"
  task :watch do |_, args|
    debug = args.extras.include?("debug")
    poll = args.extras.include?("poll")
    command = Ariadne::ViewComponents::Commands.watch_command(debug: debug, poll: poll)
    puts command.inspect
    system(*command)
  end
end

Rake::Task["assets:precompile"].enhance(["ariadne_view_components:build"]) if Rake::Task.task_defined?("assets:precompile")

if Rake::Task.task_defined?("test:prepare")
  Rake::Task["test:prepare"].enhance(["ariadne_view_components:build"])
elsif Rake::Task.task_defined?("db:test:prepare")
  Rake::Task["db:test:prepare"].enhance(["ariadne_view_components:build"])
end

Version data entries

188 entries across 188 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.26-aarch64-linux lib/tasks/build.rake
ariadne_view_components-0.0.25 lib/tasks/build.rake
ariadne_view_components-0.0.25-x86_64-linux lib/tasks/build.rake
ariadne_view_components-0.0.25-x86_64-darwin lib/tasks/build.rake
ariadne_view_components-0.0.25-x64-mingw32 lib/tasks/build.rake
ariadne_view_components-0.0.25-x64-mingw-ucrt lib/tasks/build.rake
ariadne_view_components-0.0.25-arm64-darwin lib/tasks/build.rake
ariadne_view_components-0.0.25-aarch64-linux lib/tasks/build.rake
ariadne_view_components-0.0.24 lib/tasks/build.rake
ariadne_view_components-0.0.24-x86_64-linux lib/tasks/build.rake
ariadne_view_components-0.0.24-x86_64-darwin lib/tasks/build.rake
ariadne_view_components-0.0.24-x64-mingw32 lib/tasks/build.rake
ariadne_view_components-0.0.24-x64-mingw-ucrt lib/tasks/build.rake
ariadne_view_components-0.0.24-arm64-darwin lib/tasks/build.rake
ariadne_view_components-0.0.24-aarch64-linux lib/tasks/build.rake
ariadne_view_components-0.0.23 lib/tasks/build.rake
ariadne_view_components-0.0.23-x86_64-linux lib/tasks/build.rake
ariadne_view_components-0.0.23-x86_64-darwin lib/tasks/build.rake
ariadne_view_components-0.0.23-x64-mingw32 lib/tasks/build.rake
ariadne_view_components-0.0.23-x64-mingw-ucrt lib/tasks/build.rake