uppy/private/dev/index.js
Antoine du Hamel b0bf1a3eb4
meta: move dev workspace to private/ (#3368)
* meta: move dev workspace to `private/`

* `DragDrop.html` -> `dragdrop.html`
2021-12-14 12:53:34 +01:00

23 lines
669 B
JavaScript

// eslint-disable-next-line import/no-extraneous-dependencies
import 'uppy/src/style.scss'
import DragDrop from './DragDrop.js'
import Dashboard from './Dashboard.js'
switch (window.location.pathname.toLowerCase()) {
case '/':
case '/dashboard.html': Dashboard(); break
case '/dragdrop.html': DragDrop(); break
}
if ('serviceWorker' in navigator) {
// eslint-disable-next-line compat/compat
navigator.serviceWorker
.register('/sw.js')
.then((registration) => {
console.log('ServiceWorker registration successful with scope: ', registration.scope)
})
.catch((error) => {
console.log(`Registration failed with ${error}`)
})
}