Sha256: a9557afe9bd85b0f1b3d9032d7eaef1ecb28a6fab77491bc1d31891be95cd301

Contents?: true

Size: 1.2 KB

Versions: 7

Compression:

Stored size: 1.2 KB

Contents

Thor::Actions::WARNINGS[:unchanged_no_flag] = 'unchanged'

def template(location)
  system "#{RbConfig.ruby} #{Rails.root.join("bin")}/rails app:template " + 
    "LOCATION=#{File.expand_path(location, __dir__)}"
end

namespace :ruby2js do
  namespace :install do
    desc "Install Ruby2JS with LitElement support"
    task :litelement do
      template 'install/litelement.rb'
    end

    desc "Install Ruby2JS with Preact support"
    task :preact do
      template 'install/preact.rb'
    end

    desc "Install Ruby2JS with React support"
    task :react do
      template 'install/react.rb'
      Rake::Task['webpacker:install:react'].invoke
    end

    namespace :stimulus do
      desc "Install Ruby2JS with Stimulus Sprockets support"
      task :sprockets => :"stimulus:install:asset_pipeline" do
        template 'install/stimulus-sprockets.rb'
      end

      desc "Install Ruby2JS with Stimulus Webpacker support"
      task :webpacker => :"stimulus:install" do
        template 'install/stimulus-webpacker.rb'
      end
    end
  end
end

namespace :webpacker do
  namespace :install do
    desc "Install everything needed for Ruby2JS"
    task :ruby2js do
      template 'install/webpacker.rb'
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby2js-4.1.6 lib/tasks/ruby2js_tasks.rake
ruby2js-4.1.5 lib/tasks/ruby2js_tasks.rake
ruby2js-4.1.4 lib/tasks/ruby2js_tasks.rake
ruby2js-4.1.3 lib/tasks/ruby2js_tasks.rake
ruby2js-4.1.2 lib/tasks/ruby2js_tasks.rake
ruby2js-4.1.1 lib/tasks/ruby2js_tasks.rake
ruby2js-4.1.0 lib/tasks/ruby2js_tasks.rake