mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 03:32:18 -05:00
36 lines
803 B
TypeScript
36 lines
803 B
TypeScript
|
|
// Entry point for the build script in your package.json
|
|
import Rails from '@rails/ujs'
|
|
import $ from 'jquery' // Just needed for selectize
|
|
|
|
import 'masonry-layout'
|
|
|
|
import Cocooned from '@notus.sh/cocooned'
|
|
|
|
import Uppy from '@uppy/core'
|
|
import Dashboard from '@uppy/dashboard'
|
|
import XHR from '@uppy/xhr-upload'
|
|
|
|
import 'src/preview'
|
|
import 'src/bulk_edit'
|
|
import 'src/model_edit'
|
|
import 'src/tag'
|
|
import 'src/carousel'
|
|
import 'src/file_size_validation'
|
|
|
|
// Load i18n definitions
|
|
import { I18n } from 'i18n-js'
|
|
import locales from 'src/locales.json'
|
|
window.i18n = new I18n(locales)
|
|
|
|
window.$ = $
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
Rails.start()
|
|
new Uppy()
|
|
.use(Dashboard, { inline: true, target: '#uppy-dashboard' })
|
|
.use(XHR, { endpoint: "/upload" })
|
|
Cocooned.start()
|
|
})
|