Sha256: 5782de0ef7259f22a99420e819a4f686ee8a24632275ed17d21875db5a5a3522

Contents?: true

Size: 627 Bytes

Versions: 5

Compression:

Stored size: 627 Bytes

Contents

require "webpacker"

namespace :playbook do
  namespace :webpacker do
    desc "Install deps with yarn"
    task :yarn_install do
      Dir.chdir(File.join(__dir__, "../..")) do
        system "yarn install --no-progress --production"
      end
    end

    desc "Compile JavaScript packs using webpack for production with digests"
    task compile: [:yarn_install, :environment] do
      ::Webpacker.with_node_env("production") do
          if Playbook.webpacker.commands.compile
            # Successful compilation!
          else
            # Failed compilation
            exit!
          end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
playbook_ui-2.7.2 lib/tasks/playbook_tasks.rake
playbook_ui-2.7.1 lib/tasks/playbook_tasks.rake
playbook_ui-2.7.0 lib/tasks/playbook_tasks.rake
playbook_ui-2.6.0 lib/tasks/playbook_tasks.rake
playbook_ui-2.5.0 lib/tasks/playbook_tasks.rake