diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ff1f0c..f4dff50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,3 +13,4 @@ - Vue on Rails application template using `rails new app -m https://vueonrails.com/vue -d postgresql` - Support Babel 7 - Support webpack 4 & Webpacker 4 +- Support pre-processor like pug diff --git a/README.md b/README.md index fba7786..62c9619 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,24 @@ ![vue on rails](https://vueonrails.com/assets/img/vueonrails.png) -> Vue for your favorite Rails projects +> Vue for your favorite Rails products -The Vue on Rails gem makes it easy to build Vue components on your Rails application. +The Vue on Rails gem makes it easy to build Vue components on your Rails products. It uses Rails 5.x, Vue 2.x, Webpacker 4.x, Ruby 2.x, Node 11.x, Yarn 1.12.x. -- ❄️ Server Side Rendering using Hypernova -- 💎 Compatible with Rails 6/5/4 and Webpacker -- 🌎 Internationalization for component parts - 🖖 Vue UI ready -- 🔨 Component generators and scaffolds -- 📦 Out of the box configuration -- ✂️ Specific-page Vue +- 🐶 Support pug - 🤡 Jest test ready +- ✂️ Specific-page Vue +- 👷🏻️ Asset pipeline helpers - 🎯 Simple state management +- 📦 Out of the box configuration +- 🔨 Component generators and scaffolds +- ❄️ Server Side Rendering using Hypernova - 🗃 Easily migrate to Vuex state management -- 👷🏻️ Asset pipeline helpers -- 🏎 Kickstart with our Vue on Rails application template at https://vueonrails.com/vue +- 🌎 Internationalization for component parts +- 💎 Compatible with Rails 6/5/4 and Webpacker +- 🏎 Kickstart with our application template at https://vueonrails.com/vue It ships out-of-the-box configuration, component generators and other solutions to make life easy for both Vue and Rails. diff --git a/app/helpers/syntax_helper.rb b/app/helpers/syntax_helper.rb index 31dd5a0..18ba7ff 100644 --- a/app/helpers/syntax_helper.rb +++ b/app/helpers/syntax_helper.rb @@ -1,5 +1,3 @@ -require 'hypernova' - module SyntaxHelper def specific_page_vue " #{controller_name} #{action_name} " @@ -29,7 +27,7 @@ def vue_component(identifier, variable=nil) end #server side rendering via hypernova - def render_vue(id, name) - render_react_component(id, name: name) + def render_vue_component(id, data = {}) + render_react_component(id, data) end end diff --git a/lib/generators/options/pug.rb b/lib/generators/options/pug.rb new file mode 100644 index 0000000..910a57b --- /dev/null +++ b/lib/generators/options/pug.rb @@ -0,0 +1,14 @@ +pugtemplate = <<-eos + +eos + +if options[:seperate] == true + gsub_file Rails.root.join("#{PARTS_PATH}/#{name}/#{name}.vue").to_s, + /