Sha256: af4f7433fedbbbecc5471035ffcc926b3dfa6eb884d05701889e63ffba59df40

Contents?: true

Size: 759 Bytes

Versions: 2

Compression:

Stored size: 759 Bytes

Contents

bin_path = ENV["BUNDLE_BIN"] || "./bin"

TASKS = {
  locale: "install vue-i18n",
  turbolinks: "Check Vue-turbolinks ready", 
  setup: "Check Vue on Rails ready", 
  test: "Check Jest tests ready", 
  vuex: "Check Vuex ready", 
  ui: "Check Vue-ui ready", 
  specific_page_vue: "Check Specific-page Vue ready?"
}.freeze

namespace :vue do  
  TASKS.each do |task_name, description|
    desc description
    task task_name do
      template = File.expand_path("../installs/#{task_name}.rb", __dir__)
      base_path =
      if Rails::VERSION::MAJOR >= 5
        "#{RbConfig.ruby} #{bin_path}/rails app:template"
      else
        "#{RbConfig.ruby} #{bin_path}/rake rails:template"
      end
  
      exec "#{base_path} LOCATION=#{template}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vueonrails-1.0.0.beta1 lib/tasks/vue.rake
vueonrails-0.3.0 lib/tasks/vue.rake