From d947fe68a0b29b16137101f6d5424af5933aba38 Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Tue, 27 Sep 2022 15:15:59 -0700 Subject: [PATCH] Ripping out Turbolinks now that it's been deprecated and archived. Ref #629 (#779) --- src/browser_app_skeleton/package.json | 3 +-- .../src/components/shared/layout_head.cr | 5 ++--- src/browser_app_skeleton/src/js/app.js | 8 -------- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/browser_app_skeleton/package.json b/src/browser_app_skeleton/package.json index 7939ee18..fd6b12fd 100644 --- a/src/browser_app_skeleton/package.json +++ b/src/browser_app_skeleton/package.json @@ -3,8 +3,7 @@ "private": true, "dependencies": { "@rails/ujs": "^6.0.0", - "modern-normalize": "^1.1.0", - "turbolinks": "^5.2.0" + "modern-normalize": "^1.1.0" }, "scripts": { "heroku-postbuild": "yarn prod", diff --git a/src/browser_app_skeleton/src/components/shared/layout_head.cr b/src/browser_app_skeleton/src/components/shared/layout_head.cr index 72fed8b5..fe2ca8cb 100644 --- a/src/browser_app_skeleton/src/components/shared/layout_head.cr +++ b/src/browser_app_skeleton/src/components/shared/layout_head.cr @@ -5,9 +5,8 @@ class Shared::LayoutHead < BaseComponent head do utf8_charset title "My App - #{@page_title}" - css_link asset("css/app.css"), data_turbolinks_track: "reload" - js_link asset("js/app.js"), defer: "true", data_turbolinks_track: "reload" - meta name: "turbolinks-cache-control", content: "no-cache" + css_link asset("css/app.css") + js_link asset("js/app.js"), defer: "true" csrf_meta_tags responsive_meta_tag diff --git a/src/browser_app_skeleton/src/js/app.js b/src/browser_app_skeleton/src/js/app.js index d5bb8dc2..5722d9d8 100644 --- a/src/browser_app_skeleton/src/js/app.js +++ b/src/browser_app_skeleton/src/js/app.js @@ -4,11 +4,3 @@ // Though it says "Rails" it actually works with any framework. require("@rails/ujs").start(); -// Turbolinks is optional. Learn more: https://github.com/turbolinks/turbolinks/ -require("turbolinks").start(); - -// If using Turbolinks, you can attach events to page load like this: -// -// document.addEventListener("turbolinks:load", function() { -// ... -// })