Sha256: 4a9edbdfba7a46022199456845f6886c21d94c270fdd930e08f82db2d9d58ef7
Contents?: true
Size: 1.94 KB
Versions: 1
Compression:
Stored size: 1.94 KB
Contents
bin_path = ENV["BUNDLE_BIN"] || "./bin" namespace :vue do desc "setup your vue on rails project" task :setup do template = File.expand_path("../install/setup.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 desc "install turbolinks" task :turbolinks do template = File.expand_path("../install/turbolinks.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 desc "setup vue on rails to be ready for Jest tests" task :test do template = File.expand_path("../install/test.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 desc "install vuex and vuex-rails-plugins" task :vuex do template = File.expand_path("../install/vuex.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 desc "make this rails project vue-ui compatible" task :ui do template = File.expand_path("../install/ui.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 desc "is this rail project specific-page vue enabled?" task :spv do puts "check if spv is enabled and setup?" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vuejs-1.1.0.beta8 | lib/tasks/setup.rake |