# 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 "./bin/rails app:template LOCATION=#{TEMPLATE_PATH}" end desc "Build webpack asset bundles" task build: :environment do compiler = SewingKit::Webpack::Compiler.new compiler.compile end end if Rake::Task.task_defined?('assets:precompile') Rake::Task['assets:precompile'].enhance do Rake::Task['sewing_kit:build'].invoke end end