diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-11-04 00:38:54 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-01-10 21:30:38 +0300 |
commit | fe964cc235ed22a5d013d5874284763b698aba7c (patch) | |
tree | 5529dd7d9deb13d511d37f7a8fed33de15aa6d7c /app/assets/javascripts/cycle_analytics | |
parent | 55f291e8ceae6d3d432039f72f6935c62fb2a872 (diff) |
migrate all javascript asset bundles and require syntax
Diffstat (limited to 'app/assets/javascripts/cycle_analytics')
-rw-r--r-- | app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 index 2f810a69758..3b2f5efa27d 100644 --- a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 +++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 @@ -2,9 +2,12 @@ /* global Cookies */ /* global Flash */ -//= require vue -//= require_tree ./svg -//= require_tree . +window.Vue = require('vue'); +window.Cookies = require('vendor/js.cookie'); + +function requireAll(context) { return context.keys().map(context); } +requireAll(require.context('./svg', false, /^\.\/.*\.(js|es6)$/)); +requireAll(require.context('.', false, /^\.\/(?!cycle_analytics_bundle).*\.(js|es6)$/)); $(() => { const OVERVIEW_DIALOG_COOKIE = 'cycle_analytics_help_dismissed'; |