Sha256: 2560d5e1d57ee880bff59ed6d63bf5395cda021706f04088a36c97360ea431e4

Contents?: true

Size: 1014 Bytes

Versions: 1

Compression:

Stored size: 1014 Bytes

Contents

# frozen_string_literal: true

TEMPLATE_PATH = File.expand_path("../install/template.rb", File.dirname(__FILE__))

namespace :sewing_kit do
  desc "Install all of Shopify’s modern FED tooling"
  task :install do
    exec "bundle exec rails generate sewing_kit:install"
  end

  desc "Build webpack asset bundles"
  task build: :environment do
    compiler = SewingKit::Webpack::Compiler.new
    compiler.compile
  end

  namespace :server do
    desc "Starts the production server"
    task start: :environment do
      server = SewingKit::Webpack::Server.new
      server.start
    end
  end
end

if Rake::Task.task_defined?("assets:precompile")
  Rake::Task["assets:precompile"].enhance do
    Rake::Task["sewing_kit:build"].invoke
  end
else
  Rake::Task.define_task("assets:precompile" => ["sewing_kit:build"])
end

unless Rake::Task.task_defined?("assets:clean")
  namespace :assets do
    task :clean do
      # This empty task is to offer the same interface than sprockets and webpacker
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sewing_kit-0.130.1 lib/tasks/sewing_kit.rake