Move legacy javascript folder out of packs/

This commit is contained in:
Andreas Nedbal 2020-12-25 21:53:14 +01:00 committed by Andreas Nedbal
parent 51678e5e34
commit 24f197a064
39 changed files with 32 additions and 32 deletions

2
.gitignore vendored
View file

@ -25,7 +25,7 @@ coverage/
# dont push generated js translations to repository
/app/assets/javascripts/i18n/*.js
/app/javascript/packs/legacy/i18n.js
/app/javascript/legacy/i18n.js
# every fucking time, dolphin
.directory

View file

@ -0,0 +1,11 @@
import 'tempusdominus-bootstrap-4'
require('tempusdominus-bootstrap-4/build/css/tempusdominus-bootstrap-4.css')
import '../legacy/moderation/ban'
import '../legacy/moderation/comment'
import '../legacy/moderation/destroy'
import '../legacy/moderation/privileges'
import '../legacy/moderation/vote'
$('.datetimepicker-input').datetimepicker({})

View file

@ -1,8 +1,8 @@
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import './jquery'
import './bootstrap'
import '../legacy/jquery'
import '../legacy/bootstrap'
import {} from 'jquery-ujs'
import 'jquery.turbolinks/src/jquery.turbolinks'
import 'jquery.guillotine'
@ -19,21 +19,21 @@ require('jquery.guillotine/css/jquery.guillotine.css')
require('sweetalert/dist/sweetalert.css')
# this file is generated by Rails
import I18n from './i18n'
import I18n from '../legacy/i18n'
import './answerbox'
import './questionbox'
import './inbox'
import './lists'
import './memes'
import './notifications'
import './pagination'
import './question'
import './settings'
import './user'
import './report'
import './locale-box'
import './util'
import '../legacy/answerbox'
import '../legacy/questionbox'
import '../legacy/inbox'
import '../legacy/lists'
import '../legacy/memes'
import '../legacy/notifications'
import '../legacy/pagination'
import '../legacy/question'
import '../legacy/settings'
import '../legacy/user'
import '../legacy/report'
import '../legacy/locale-box'
import '../legacy/util'
window.moment = moment

View file

@ -1,11 +0,0 @@
import 'tempusdominus-bootstrap-4'
require('tempusdominus-bootstrap-4/build/css/tempusdominus-bootstrap-4.css')
import './ban'
import './comment'
import './destroy'
import './privileges'
import './vote'
$('.datetimepicker-input').datetimepicker({})

View file

@ -11,11 +11,11 @@
%link{ rel: 'icon', href: '/images/favicon/favicon-32.png', sizes: '32x32' }
%title= yield(:title)
= stylesheet_link_tag 'application', media: 'all', data: { 'turbolinks-track': true }
= javascript_pack_tag 'legacy/application', data: { 'turbolinks-track': true }
= javascript_pack_tag 'legacy', data: { 'turbolinks-track': true }
= javascript_pack_tag 'hello_typescript'
= stylesheet_pack_tag 'legacy/application', data: { 'turbolinks-track': true }
= stylesheet_pack_tag 'legacy', data: { 'turbolinks-track': true }
- if user_signed_in? && current_user.mod?
= javascript_pack_tag 'legacy/moderation/index', data: { 'turbolinks-track': true }
= javascript_pack_tag 'legacy-moderation', data: { 'turbolinks-track': true }
= csrf_meta_tags
%body
- if user_signed_in?

View file

@ -24,7 +24,7 @@
fallbacks: :default_locale
translations:
- file: 'app/javascript/packs/legacy/i18n.js'
- file: 'app/javascript/legacy/i18n.js'
only: ['*.frontend.*', '*.views.actions.*']
prefix: "import I18n from 'i18n-js'\n"
suffix: "\nexport default I18n"