Skip to content

Instantly share code, notes, and snippets.

Jordano Moscoso Xosmond

View GitHub Profile
@Xosmond
Xosmond / application.html.erb
Created Dec 13, 2018
vuerails application layout before vue only webpack
View application.html.erb
<!DOCTYPE html>
<html>
<head>
<title>Vuerails</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<!-- Webpack assets -->
@Xosmond
Xosmond / routes.rb
Last active Dec 18, 2018
vuerails routes
View routes.rb
Rails.application.routes.draw do
root to: 'home#index'
end
@Xosmond
Xosmond / application.css
Last active Dec 18, 2018
vuerails tailwind basic css
View application.css
/* app/javascript/css/application.css */
@tailwind preflight; /* Basic Normalize */
@tailwind utilities; /* Tailwindcss utilities */
@Xosmond
Xosmond / application.js
Last active Dec 18, 2018
vuerails simple
View application.js
/* app/javascript/packs/application.js */
/* eslint no-console:0 */
import "../css/application.css";
@Xosmond
Xosmond / application.js
Last active Dec 13, 2018
vuerails vue-turbolinks
View application.js
/* eslint no-console:0 */
import "../css/application.css";
import Vue from 'vue/dist/vue.esm';
import TurbolinksAdapter from 'vue-turbolinks';
import Vuelidate from 'vuelidate';
Vue.use(TurbolinksAdapter);
Vue.use(Vuelidate);
document.addEventListener('turbolinks:load', () => {
@Xosmond
Xosmond / application.html.erb
Created Dec 13, 2018
vuerails application erb
View application.html.erb
<!DOCTYPE html>
<html>
<head>
<title>Vuerails</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
@Xosmond
Xosmond / application.js
Created Dec 13, 2018
vuerails vue-turbolinks-vuelidate
View application.js
/* eslint no-console:0 */
import "../css/application.css";
import TurbolinksAdapter from 'vue-turbolinks';
import Vuelidate from 'vuelidate';
import Vue from 'vue/dist/vue.esm';
Vue.use(Vuelidate)
Vue.use(TurbolinksAdapter)
document.addEventListener('turbolinks:load', () => {
@Xosmond
Xosmond / new.html.erb
Created Dec 13, 2018
vuerails new session view
View new.html.erb
<login :token="<%= form_authenticity_token.to_json %>" :action="<%= user_session_path.to_json %>"></login>
@Xosmond
Xosmond / .postcssrs.yml
Created Dec 13, 2018
vuerails webpack tailwindcss
View .postcssrs.yml
plugins:
postcss-import: {}
postcss-cssnext: {}
tailwindcss: {}
@Xosmond
Xosmond / application.js
Created Dec 13, 2018
vuerails application.js
View application.js
/* eslint no-console:0 */
import "../css/application.css";
import TurbolinksAdapter from 'vue-turbolinks';
import Vuelidate from 'vuelidate';
import Vue from 'vue/dist/vue.esm';
import Login from '../components/login.vue';
Vue.use(Vuelidate)
Vue.use(TurbolinksAdapter)
You can’t perform that action at this time.