From 8af754e1087d662ab68964aa67685d48b8e7c4fc Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 10 Oct 2018 08:03:13 +0100 Subject: Run rails new testapp --skip-bundle --- testapp/app/assets/config/manifest.js | 3 +++ testapp/app/assets/images/.keep | 0 testapp/app/assets/javascripts/application.js | 16 ++++++++++++++++ testapp/app/assets/javascripts/cable.js | 13 +++++++++++++ testapp/app/assets/javascripts/channels/.keep | 0 testapp/app/assets/stylesheets/application.css | 15 +++++++++++++++ 6 files changed, 47 insertions(+) create mode 100644 testapp/app/assets/config/manifest.js create mode 100644 testapp/app/assets/images/.keep create mode 100644 testapp/app/assets/javascripts/application.js create mode 100644 testapp/app/assets/javascripts/cable.js create mode 100644 testapp/app/assets/javascripts/channels/.keep create mode 100644 testapp/app/assets/stylesheets/application.css (limited to 'testapp/app/assets') diff --git a/testapp/app/assets/config/manifest.js b/testapp/app/assets/config/manifest.js new file mode 100644 index 0000000..b16e53d --- /dev/null +++ b/testapp/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css diff --git a/testapp/app/assets/images/.keep b/testapp/app/assets/images/.keep new file mode 100644 index 0000000..e69de29 diff --git a/testapp/app/assets/javascripts/application.js b/testapp/app/assets/javascripts/application.js new file mode 100644 index 0000000..82e6f0f --- /dev/null +++ b/testapp/app/assets/javascripts/application.js @@ -0,0 +1,16 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's +// vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require rails-ujs +//= require activestorage +//= require turbolinks +//= require_tree . diff --git a/testapp/app/assets/javascripts/cable.js b/testapp/app/assets/javascripts/cable.js new file mode 100644 index 0000000..739aa5f --- /dev/null +++ b/testapp/app/assets/javascripts/cable.js @@ -0,0 +1,13 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the `rails generate channel` command. +// +//= require action_cable +//= require_self +//= require_tree ./channels + +(function() { + this.App || (this.App = {}); + + App.cable = ActionCable.createConsumer(); + +}).call(this); diff --git a/testapp/app/assets/javascripts/channels/.keep b/testapp/app/assets/javascripts/channels/.keep new file mode 100644 index 0000000..e69de29 diff --git a/testapp/app/assets/stylesheets/application.css b/testapp/app/assets/stylesheets/application.css new file mode 100644 index 0000000..d05ea0f --- /dev/null +++ b/testapp/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's + * vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ -- cgit v1.2.3