├── .gitignore ├── Gemfile ├── LICENSE.md ├── Rakefile ├── Readme.md ├── lib ├── vuejs-rails.rb └── vuejs-rails │ ├── engine.rb │ └── version.rb ├── vendor └── assets │ └── javascripts │ ├── dist │ ├── vue-resource.js │ ├── vue-resource.min.js │ ├── vue-router.js │ ├── vue-router.min.js │ ├── vue.js │ ├── vue.min.js │ ├── vuex.js │ └── vuex.min.js │ ├── vue-resource.js.erb │ ├── vue-router.js.erb │ ├── vue.js.erb │ └── vuex.js.erb └── vuejs-rails.gemspec /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | .bundle 3 | Gemfile.lock 4 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "http://rubygems.org" 2 | gemspec 3 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 - 2017 Adam Butler 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # vuejs-rails 2 | 3 | [![Gem](https://img.shields.io/gem/v/vuejs-rails.svg)](https://rubygems.org/gems/vuejs-rails) 4 | [![Gem](https://img.shields.io/gem/dt/vuejs-rails.svg)](https://rubygems.org/gems/vuejs-rails) 5 | 6 | ### About 7 | 8 | Rails 3.1+ asset-pipeline gem to provide Vue.js 9 | 10 | ### Package Versions 11 | 12 | - vue v2.5.13 13 | - vue-router v3.0.1 14 | - vue-resource v1.3.5 15 | - vuex v3.0.1 16 | 17 | ### Compatibility 18 | 19 | - vue-router v3.0.0 has breaking changes for TypeScript: https://github.com/vuejs/vue-router/releases/tag/v3.0.0 20 | - vuex v3.0.0 has breaking changes for TypeScript: https://github.com/vuejs/vuex/releases/tag/v3.0.0 21 | 22 | ### Setup 23 | 24 | Have in your Gemfile: 25 | 26 | ```ruby 27 | gem 'vuejs-rails' 28 | ``` 29 | 30 | And in your application.js manifest: 31 | 32 | ```js 33 | //= require vue 34 | //= require vue-router (optional) 35 | //= require vue-resource (optional) 36 | //= require vuex (optional) 37 | ``` 38 | 39 | If your `application.js` requires TurboLinks (a default setting for new Rails apps), you should strongly consider disabling it, as it will cause pages to load without reloading the Javascript. 40 | 41 | In `app/views/layouts/application.html.erb`, move this line from the head of the document to the end of the body: 42 | 43 | ```html 44 | <%= javascript_include_tag 'application' %> 45 | ``` 46 | 47 | You may write your Vue.js code directly in your views using `