Create a clean application.js file for new design

This commit is contained in:
Mathieu Magnin 2017-06-26 12:01:40 +02:00
parent 649af19443
commit b7dc511a7d
3 changed files with 20 additions and 2 deletions

View file

@ -0,0 +1,18 @@
// 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, vendor/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.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require highcharts
//= require chartkick
//= require_tree .

View file

@ -37,7 +37,7 @@
= render partial: "layouts/mailjet_newsletter" = render partial: "layouts/mailjet_newsletter"
= render partial: "layouts/crisp" = render partial: "layouts/crisp"
= javascript_include_tag "application", "data-turbolinks-track": true = javascript_include_tag "new_design/application", "data-turbolinks-track": true
= yield :charts_js = yield :charts_js
- if Rails.env == "test" - if Rails.env == "test"
%script{ type: "text/javascript" } %script{ type: "text/javascript" }

View file

@ -8,4 +8,4 @@ Rails.application.config.assets.version = '1.0'
# Precompile additional assets. # Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
Rails.application.config.assets.precompile += %w(print.css new_design/new_application.css) Rails.application.config.assets.precompile += %w(print.css new_design/new_application.css new_design/application.js)