Sha256: 2fc17860913117f7342d918eff9a1c423fe751361e3f7300b8297a3e1302c9e8

Contents?: true

Size: 547 Bytes

Versions: 6

Compression:

Stored size: 547 Bytes

Contents

require 'bundler'
Bundler.setup :default, ENV.fetch('RACK_ENV') { :development }
$LOAD_PATH << 'app'

require 'opal'
require 'clearwater'
require 'roda/opal_assets'
require 'assets'

# Keep a single asset compiler in case we want to use it for multiple tasks.
assets = Roda::OpalAssets.new(env: :production)

desc 'Precompile assets for production'
task 'assets:precompile' do
  warn = method(:warn)
  module Kernel
    def warn(*)
    end
  end
  assets << 'app.js'
  assets.build

  Kernel.class_exec do
    define_method :warn, &warn
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
clearwater-roda-0.3.0 templates/Rakefile
clearwater-roda-0.2.4 templates/Rakefile
clearwater-roda-0.2.3 templates/Rakefile
clearwater-roda-0.2.2 templates/Rakefile
clearwater-roda-0.2.1 templates/Rakefile
clearwater-roda-0.2.0 templates/Rakefile