Sha256: 6d6c1b3e177e4183f412f0639ebc091e7c08b852eac2f9e7f56ff844e13b9576

Contents?: true

Size: 1013 Bytes

Versions: 2

Compression:

Stored size: 1013 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" => %w(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

2 entries across 2 versions & 1 rubygems

Version Path
sewing_kit-0.130.0 lib/tasks/sewing_kit.rake
sewing_kit-0.129.0 lib/tasks/sewing_kit.rake