Forráskód Böngészése

convert everything to const/require and module.exports :scream_cat:

Artur Paikin 8 éve
szülő
commit
db647f7c14
56 módosított fájl, 259 hozzáadás és 306 törlés
  1. 7 7
      example/main.js
  2. 0 0
      src/core/_html.js
  3. 2 2
      src/core/index.js
  4. 14 34
      src/index.js
  5. 2 2
      src/plugins/Dashboard/ActionBrowseTagline.js
  6. 9 9
      src/plugins/Dashboard/Dashboard.js
  7. 3 3
      src/plugins/Dashboard/FileCard.js
  8. 7 7
      src/plugins/Dashboard/FileItem.js
  9. 2 2
      src/plugins/Dashboard/FileItemProgress.js
  10. 5 5
      src/plugins/Dashboard/FileList.js
  11. 2 2
      src/plugins/Dashboard/ProgressCircle.js
  12. 2 2
      src/plugins/Dashboard/StatusBar.js
  13. 4 4
      src/plugins/Dashboard/Tabs.js
  14. 3 3
      src/plugins/Dashboard/UploadBtn.js
  15. 32 22
      src/plugins/Dashboard/icons.js
  16. 9 25
      src/plugins/Dashboard/index.js
  17. 1 8
      src/plugins/DragDrop/index.js
  18. 6 6
      src/plugins/Dummy.js
  19. 5 14
      src/plugins/FileInput.js
  20. 2 2
      src/plugins/GoogleDrive/AuthView.js
  21. 2 2
      src/plugins/GoogleDrive/Breadcrumb.js
  22. 3 3
      src/plugins/GoogleDrive/Breadcrumbs.js
  23. 4 4
      src/plugins/GoogleDrive/Browser.js
  24. 2 2
      src/plugins/GoogleDrive/Error.js
  25. 2 2
      src/plugins/GoogleDrive/Sidebar.js
  26. 3 3
      src/plugins/GoogleDrive/Table.js
  27. 2 2
      src/plugins/GoogleDrive/TableRow.js
  28. 9 9
      src/plugins/GoogleDrive/index.js
  29. 2 2
      src/plugins/GoogleDrive/new/Breadcrumb.js
  30. 3 3
      src/plugins/GoogleDrive/new/Breadcrumbs.js
  31. 4 4
      src/plugins/GoogleDrive/new/Browser.js
  32. 3 3
      src/plugins/GoogleDrive/new/Table.js
  33. 2 2
      src/plugins/GoogleDrive/new/TableColumn.js
  34. 3 3
      src/plugins/GoogleDrive/new/TableRow.js
  35. 4 4
      src/plugins/Informer.js
  36. 2 2
      src/plugins/MagicLog.js
  37. 2 2
      src/plugins/MetaData.js
  38. 2 2
      src/plugins/Multipart.js
  39. 2 2
      src/plugins/PersistentState.js
  40. 3 3
      src/plugins/ProgressBar.js
  41. 4 4
      src/plugins/Tus10.js
  42. 4 6
      src/plugins/Webcam/CameraIcon.js
  43. 3 3
      src/plugins/Webcam/CameraScreen.js
  44. 2 2
      src/plugins/Webcam/PermissionsScreen.js
  45. 4 6
      src/plugins/Webcam/WebcamIcon.js
  46. 7 7
      src/plugins/Webcam/index.js
  47. 41 0
      src/plugins/_index.js
  48. 0 42
      src/plugins/index.js
  49. 5 5
      src/uppy-base/src/index.js
  50. 2 2
      src/uppy-base/src/plugins/Multipart.js
  51. 1 1
      src/uppy-base/src/plugins/Provider.js
  52. 4 4
      src/uppy-base/src/plugins/Tus10.js
  53. 2 2
      src/uppy-base/src/plugins/Webcam.js
  54. 2 2
      src/uppy-base/src/utils/UppySocket.js
  55. 1 1
      src/uppy-base/src/utils/dataURItoFile.js
  56. 1 1
      src/uppy-base/src/utils/toArray.js

+ 7 - 7
example/main.js

@@ -1,17 +1,17 @@
 // import Uppy from '../src/core'
 // import Uppy from '../src/core'
 // import Dummy from '../src/plugins/Dummy.js'
 // import Dummy from '../src/plugins/Dummy.js'
-import Dashboard from '../src/plugins/Dashboard'
-import GoogleDrive from '../src/plugins/GoogleDrive'
-import Webcam from '../src/plugins/Webcam'
-import Tus10 from '../src/plugins/Tus10'
-import MetaData from '../src/plugins/MetaData'
-import Informer from '../src/plugins/Informer'
+const Dashboard = require('../src/plugins/Dashboard')
+const GoogleDrive = require('../src/plugins/GoogleDrive')
+const Webcam = require('../src/plugins/Webcam')
+const Tus10 = require('../src/plugins/Tus10')
+const MetaData = require('../src/plugins/MetaData')
+const Informer = require('../src/plugins/Informer')
 // import Dummy from '../src/plugins/Dummy'
 // import Dummy from '../src/plugins/Dummy'
 // import ProgressBar from '../src/plugins/ProgressBar'
 // import ProgressBar from '../src/plugins/ProgressBar'
 // import DragDrop from '../src/plugins/DragDrop'
 // import DragDrop from '../src/plugins/DragDrop'
 // import FileInput from '../src/plugins/FileInput'
 // import FileInput from '../src/plugins/FileInput'
 
 
-const Uppy = require('../src/core')
+const Uppy = require('../src/core/Core.js')
 // const Dashboard = require('../src/plugins/Dashboard')
 // const Dashboard = require('../src/plugins/Dashboard')
 
 
 const PROTOCOL = location.protocol === 'https:' ? 'https' : 'http'
 const PROTOCOL = location.protocol === 'https:' ? 'https' : 'http'

+ 0 - 0
src/core/html.js → src/core/_html.js


+ 2 - 2
src/core/index.js

@@ -1,2 +1,2 @@
-import Core from './Core'
-export default Core
+const Core = require('./Core')
+module.exports = Core

+ 14 - 34
src/index.js

@@ -1,52 +1,32 @@
-import Core from './core/index.js'
+const Core = require('./core/index.js')
 
 
 // Parent
 // Parent
-import Plugin from './plugins/Plugin'
-
-const locales = {}
+const Plugin = require('./plugins/Plugin')
 
 
 // Orchestrators
 // Orchestrators
-import Dashboard from './plugins/Dashboard/index.js'
+const Dashboard = require('./plugins/Dashboard/index.js')
 
 
 // Acquirers
 // Acquirers
-import Dummy from './plugins/Dummy'
-import DragDrop from './plugins/DragDrop/index.js'
-import FileInput from './plugins/FileInput.js'
-import GoogleDrive from './plugins/GoogleDrive/index.js'
-import Webcam from './plugins/Webcam/index.js'
+const Dummy = require('./plugins/Dummy')
+const DragDrop = require('./plugins/DragDrop/index.js')
+const FileInput = require('./plugins/FileInput.js')
+const GoogleDrive = require('./plugins/GoogleDrive/index.js')
+const Webcam = require('./plugins/Webcam/index.js')
 
 
 // Progressindicators
 // Progressindicators
-import ProgressBar from './plugins/ProgressBar.js'
-import Informer from './plugins/Informer.js'
+const ProgressBar = require('./plugins/ProgressBar.js')
+const Informer = require('./plugins/Informer.js')
 
 
 // Modifiers
 // Modifiers
-import MetaData from './plugins/MetaData.js'
+const MetaData = require('./plugins/MetaData.js')
 
 
 // Uploaders
 // Uploaders
-import Tus10 from './plugins/Tus10'
-import Multipart from './plugins/Multipart'
-
-export default {
-  Core,
-  Plugin,
-  locales,
-  Dummy,
-  ProgressBar,
-  Informer,
-  DragDrop,
-  GoogleDrive,
-  FileInput,
-  Tus10,
-  Multipart,
-  Dashboard,
-  MetaData,
-  Webcam
-}
+const Tus10 = require('./plugins/Tus10')
+const Multipart = require('./plugins/Multipart')
 
 
-export {
+module.exports = {
   Core,
   Core,
   Plugin,
   Plugin,
-  locales,
   Dummy,
   Dummy,
   ProgressBar,
   ProgressBar,
   Informer,
   Informer,

+ 2 - 2
src/plugins/Dashboard/ActionBrowseTagline.js

@@ -1,6 +1,6 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <span>
     <span>
       ${props.acquirers.length === 0
       ${props.acquirers.length === 0

+ 9 - 9
src/plugins/Dashboard/Dashboard.js

@@ -1,15 +1,15 @@
-import html from '../../core/html'
-import FileList from './FileList'
-import Tabs from './Tabs'
-import FileCard from './FileCard'
-import UploadBtn from './UploadBtn'
-import StatusBar from './StatusBar'
-import { isTouchDevice, toArray } from '../../core/Utils'
-import { closeIcon } from './icons'
+const html = require('yo-yo')
+const FileList = require('./FileList')
+const Tabs = require('./Tabs')
+const FileCard = require('./FileCard')
+const UploadBtn = require('./UploadBtn')
+const StatusBar = require('./StatusBar')
+const { isTouchDevice, toArray } = require('../../core/Utils')
+const { closeIcon } = require('./icons')
 
 
 // http://dev.edenspiekermann.com/2016/02/11/introducing-accessible-modal-dialog
 // http://dev.edenspiekermann.com/2016/02/11/introducing-accessible-modal-dialog
 
 
-export default function Dashboard (props) {
+module.exports = function Dashboard (props) {
   const handleInputChange = (ev) => {
   const handleInputChange = (ev) => {
     ev.preventDefault()
     ev.preventDefault()
     const files = toArray(ev.target.files)
     const files = toArray(ev.target.files)

+ 3 - 3
src/plugins/Dashboard/FileCard.js

@@ -1,5 +1,5 @@
-import html from '../../core/html'
-import { iconText, iconFile, iconAudio, checkIcon } from './icons'
+const html = require('yo-yo')
+const { iconText, iconFile, iconAudio, checkIcon } = require('./icons')
 
 
 function getIconByMime (fileTypeGeneral) {
 function getIconByMime (fileTypeGeneral) {
   switch (fileTypeGeneral) {
   switch (fileTypeGeneral) {
@@ -12,7 +12,7 @@ function getIconByMime (fileTypeGeneral) {
   }
   }
 }
 }
 
 
-export default function fileCard (props) {
+module.exports = function fileCard (props) {
   const file = props.fileCardFor ? props.files[props.fileCardFor] : false
   const file = props.fileCardFor ? props.files[props.fileCardFor] : false
   const meta = {}
   const meta = {}
 
 

+ 7 - 7
src/plugins/Dashboard/FileItem.js

@@ -1,13 +1,13 @@
-import html from '../../core/html'
-import { getETA,
+const html = require('yo-yo')
+const { getETA,
          getSpeed,
          getSpeed,
          prettyETA,
          prettyETA,
          getFileNameAndExtension,
          getFileNameAndExtension,
          truncateString,
          truncateString,
-         copyToClipboard } from '../../core/Utils'
-import prettyBytes from 'pretty-bytes'
-import FileItemProgress from './FileItemProgress'
-import { iconText, iconFile, iconAudio, iconEdit, iconCopy } from './icons'
+         copyToClipboard } = require('../../core/Utils')
+const prettyBytes = require('pretty-bytes')
+const FileItemProgress = require('./FileItemProgress')
+const { iconText, iconFile, iconAudio, iconEdit, iconCopy } = require('./icons')
 
 
 function getIconByMime (fileTypeGeneral) {
 function getIconByMime (fileTypeGeneral) {
   switch (fileTypeGeneral) {
   switch (fileTypeGeneral) {
@@ -20,7 +20,7 @@ function getIconByMime (fileTypeGeneral) {
   }
   }
 }
 }
 
 
-export default function fileItem (props) {
+module.exports = function fileItem (props) {
   const file = props.file
   const file = props.file
 
 
   const isUploaded = file.progress.uploadComplete
   const isUploaded = file.progress.uploadComplete

+ 2 - 2
src/plugins/Dashboard/FileItemProgress.js

@@ -1,9 +1,9 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
 // http://codepen.io/Harkko/pen/rVxvNM
 // http://codepen.io/Harkko/pen/rVxvNM
 // https://gist.github.com/eswak/ad4ea57bcd5ff7aa5d42
 // https://gist.github.com/eswak/ad4ea57bcd5ff7aa5d42
 
 
-export default function (props) {
+module.exports = (props) => {
   return html`
   return html`
     <svg width="70" height="70" viewBox="0 0 36 36" class="UppyIcon UppyIcon-progressCircle">
     <svg width="70" height="70" viewBox="0 0 36 36" class="UppyIcon UppyIcon-progressCircle">
       <g class="progress-group">
       <g class="progress-group">

+ 5 - 5
src/plugins/Dashboard/FileList.js

@@ -1,9 +1,9 @@
-import html from '../../core/html'
-import FileItem from './FileItem'
-import ActionBrowseTagline from './ActionBrowseTagline'
-import { dashboardBgIcon } from './icons'
+const html = require('yo-yo')
+const FileItem = require('./FileItem')
+const ActionBrowseTagline = require('./ActionBrowseTagline')
+const { dashboardBgIcon } = require('./icons')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`<ul class="UppyDashboard-files
   return html`<ul class="UppyDashboard-files
                          ${props.totalFileCount === 0 ? 'UppyDashboard-files--noFiles' : ''}">
                          ${props.totalFileCount === 0 ? 'UppyDashboard-files--noFiles' : ''}">
       ${props.totalFileCount === 0
       ${props.totalFileCount === 0

+ 2 - 2
src/plugins/Dashboard/ProgressCircle.js

@@ -1,6 +1,6 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   props = props || {}
   props = props || {}
 
 
   const togglePauseResume = () => {
   const togglePauseResume = () => {

+ 2 - 2
src/plugins/Dashboard/StatusBar.js

@@ -1,6 +1,6 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   props = props || {}
   props = props || {}
 
 
   const isHidden = props.totalFileCount === 0 || !props.isUploadStarted
   const isHidden = props.totalFileCount === 0 || !props.isUploadStarted

+ 4 - 4
src/plugins/Dashboard/Tabs.js

@@ -1,8 +1,8 @@
-import html from '../../core/html'
-import ActionBrowseTagline from './ActionBrowseTagline'
-import { localIcon } from './icons'
+const html = require('yo-yo')
+const ActionBrowseTagline = require('./ActionBrowseTagline')
+const { localIcon } = require('./icons')
 
 
-export default (props) => {
+module.exports = (props) => {
   const isHidden = Object.keys(props.files).length === 0
   const isHidden = Object.keys(props.files).length === 0
 
 
   if (props.acquirers.length === 0) {
   if (props.acquirers.length === 0) {

+ 3 - 3
src/plugins/Dashboard/UploadBtn.js

@@ -1,7 +1,7 @@
-import html from '../../core/html'
-import { uploadIcon } from './icons'
+const html = require('yo-yo')
+const { uploadIcon } = require('./icons')
 
 
-export default (props) => {
+module.exports = (props) => {
   props = props || {}
   props = props || {}
 
 
   return html`<button class="UppyButton--circular
   return html`<button class="UppyButton--circular

+ 32 - 22
src/plugins/Dashboard/icons.js

@@ -1,27 +1,27 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
 // https://css-tricks.com/creating-svg-icon-system-react/
 // https://css-tricks.com/creating-svg-icon-system-react/
 
 
-export function defaultTabIcon () {
+function defaultTabIcon () {
   return html`<svg class="UppyIcon" width="30" height="30" viewBox="0 0 30 30">
   return html`<svg class="UppyIcon" width="30" height="30" viewBox="0 0 30 30">
     <path d="M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z" />
     <path d="M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z" />
   </svg>`
   </svg>`
 }
 }
 
 
-export function iconCopy () {
+function iconCopy () {
   return html`<svg class="UppyIcon" width="51" height="51" viewBox="0 0 51 51">
   return html`<svg class="UppyIcon" width="51" height="51" viewBox="0 0 51 51">
     <path d="M17.21 45.765a5.394 5.394 0 0 1-7.62 0l-4.12-4.122a5.393 5.393 0 0 1 0-7.618l6.774-6.775-2.404-2.404-6.775 6.776c-3.424 3.427-3.424 9 0 12.426l4.12 4.123a8.766 8.766 0 0 0 6.216 2.57c2.25 0 4.5-.858 6.214-2.57l13.55-13.552a8.72 8.72 0 0 0 2.575-6.213 8.73 8.73 0 0 0-2.575-6.213l-4.123-4.12-2.404 2.404 4.123 4.12a5.352 5.352 0 0 1 1.58 3.81c0 1.438-.562 2.79-1.58 3.808l-13.55 13.55z"/>
     <path d="M17.21 45.765a5.394 5.394 0 0 1-7.62 0l-4.12-4.122a5.393 5.393 0 0 1 0-7.618l6.774-6.775-2.404-2.404-6.775 6.776c-3.424 3.427-3.424 9 0 12.426l4.12 4.123a8.766 8.766 0 0 0 6.216 2.57c2.25 0 4.5-.858 6.214-2.57l13.55-13.552a8.72 8.72 0 0 0 2.575-6.213 8.73 8.73 0 0 0-2.575-6.213l-4.123-4.12-2.404 2.404 4.123 4.12a5.352 5.352 0 0 1 1.58 3.81c0 1.438-.562 2.79-1.58 3.808l-13.55 13.55z"/>
     <path d="M44.256 2.858A8.728 8.728 0 0 0 38.043.283h-.002a8.73 8.73 0 0 0-6.212 2.574l-13.55 13.55a8.725 8.725 0 0 0-2.575 6.214 8.73 8.73 0 0 0 2.574 6.216l4.12 4.12 2.405-2.403-4.12-4.12a5.357 5.357 0 0 1-1.58-3.812c0-1.437.562-2.79 1.58-3.808l13.55-13.55a5.348 5.348 0 0 1 3.81-1.58c1.44 0 2.792.562 3.81 1.58l4.12 4.12c2.1 2.1 2.1 5.518 0 7.617L39.2 23.775l2.404 2.404 6.775-6.777c3.426-3.427 3.426-9 0-12.426l-4.12-4.12z"/>
     <path d="M44.256 2.858A8.728 8.728 0 0 0 38.043.283h-.002a8.73 8.73 0 0 0-6.212 2.574l-13.55 13.55a8.725 8.725 0 0 0-2.575 6.214 8.73 8.73 0 0 0 2.574 6.216l4.12 4.12 2.405-2.403-4.12-4.12a5.357 5.357 0 0 1-1.58-3.812c0-1.437.562-2.79 1.58-3.808l13.55-13.55a5.348 5.348 0 0 1 3.81-1.58c1.44 0 2.792.562 3.81 1.58l4.12 4.12c2.1 2.1 2.1 5.518 0 7.617L39.2 23.775l2.404 2.404 6.775-6.777c3.426-3.427 3.426-9 0-12.426l-4.12-4.12z"/>
   </svg>`
   </svg>`
 }
 }
 
 
-export function iconResume () {
+function iconResume () {
   return html`<svg class="UppyIcon" width="25" height="25" viewBox="0 0 44 44">
   return html`<svg class="UppyIcon" width="25" height="25" viewBox="0 0 44 44">
     <polygon class="play" transform="translate(6, 5.5)" points="13 21.6666667 13 11 21 16.3333333" />
     <polygon class="play" transform="translate(6, 5.5)" points="13 21.6666667 13 11 21 16.3333333" />
   </svg>`
   </svg>`
 }
 }
 
 
-export function iconPause () {
+function iconPause () {
   return html`<svg class="UppyIcon" width="25px" height="25px" viewBox="0 0 44 44">
   return html`<svg class="UppyIcon" width="25px" height="25px" viewBox="0 0 44 44">
     <g transform="translate(18, 17)" class="pause">
     <g transform="translate(18, 17)" class="pause">
       <rect x="0" y="0" width="2" height="10" rx="0" />
       <rect x="0" y="0" width="2" height="10" rx="0" />
@@ -30,72 +30,82 @@ export function iconPause () {
   </svg>`
   </svg>`
 }
 }
 
 
-export function iconEdit () {
+function iconEdit () {
   return html`<svg class="UppyIcon" width="28" height="28" viewBox="0 0 28 28">
   return html`<svg class="UppyIcon" width="28" height="28" viewBox="0 0 28 28">
     <path d="M25.436 2.566a7.98 7.98 0 0 0-2.078-1.51C22.638.703 21.906.5 21.198.5a3 3 0 0 0-1.023.17 2.436 2.436 0 0 0-.893.562L2.292 18.217.5 27.5l9.28-1.796 16.99-16.99c.255-.254.444-.56.562-.888a3 3 0 0 0 .17-1.023c0-.708-.205-1.44-.555-2.16a8 8 0 0 0-1.51-2.077zM9.01 24.252l-4.313.834c0-.03.008-.06.012-.09.007-.944-.74-1.715-1.67-1.723-.04 0-.078.007-.118.01l.83-4.29L17.72 5.024l5.264 5.264L9.01 24.252zm16.84-16.96a.818.818 0 0 1-.194.31l-1.57 1.57-5.26-5.26 1.57-1.57a.82.82 0 0 1 .31-.194 1.45 1.45 0 0 1 .492-.074c.397 0 .917.126 1.468.397.55.27 1.13.678 1.656 1.21.53.53.94 1.11 1.208 1.655.272.55.397 1.07.393 1.468.004.193-.027.358-.074.488z" />
     <path d="M25.436 2.566a7.98 7.98 0 0 0-2.078-1.51C22.638.703 21.906.5 21.198.5a3 3 0 0 0-1.023.17 2.436 2.436 0 0 0-.893.562L2.292 18.217.5 27.5l9.28-1.796 16.99-16.99c.255-.254.444-.56.562-.888a3 3 0 0 0 .17-1.023c0-.708-.205-1.44-.555-2.16a8 8 0 0 0-1.51-2.077zM9.01 24.252l-4.313.834c0-.03.008-.06.012-.09.007-.944-.74-1.715-1.67-1.723-.04 0-.078.007-.118.01l.83-4.29L17.72 5.024l5.264 5.264L9.01 24.252zm16.84-16.96a.818.818 0 0 1-.194.31l-1.57 1.57-5.26-5.26 1.57-1.57a.82.82 0 0 1 .31-.194 1.45 1.45 0 0 1 .492-.074c.397 0 .917.126 1.468.397.55.27 1.13.678 1.656 1.21.53.53.94 1.11 1.208 1.655.272.55.397 1.07.393 1.468.004.193-.027.358-.074.488z" />
   </svg>`
   </svg>`
 }
 }
 
 
-export function localIcon () {
+function localIcon () {
   return html`<svg class="UppyIcon" width="27" height="25" viewBox="0 0 27 25">
   return html`<svg class="UppyIcon" width="27" height="25" viewBox="0 0 27 25">
     <path d="M5.586 9.288a.313.313 0 0 0 .282.176h4.84v3.922c0 1.514 1.25 2.24 2.792 2.24 1.54 0 2.79-.726 2.79-2.24V9.464h4.84c.122 0 .23-.068.284-.176a.304.304 0 0 0-.046-.324L13.735.106a.316.316 0 0 0-.472 0l-7.63 8.857a.302.302 0 0 0-.047.325z"/>
     <path d="M5.586 9.288a.313.313 0 0 0 .282.176h4.84v3.922c0 1.514 1.25 2.24 2.792 2.24 1.54 0 2.79-.726 2.79-2.24V9.464h4.84c.122 0 .23-.068.284-.176a.304.304 0 0 0-.046-.324L13.735.106a.316.316 0 0 0-.472 0l-7.63 8.857a.302.302 0 0 0-.047.325z"/>
     <path d="M24.3 5.093c-.218-.76-.54-1.187-1.208-1.187h-4.856l1.018 1.18h3.948l2.043 11.038h-7.193v2.728H9.114v-2.725h-7.36l2.66-11.04h3.33l1.018-1.18H3.907c-.668 0-1.06.46-1.21 1.186L0 16.456v7.062C0 24.338.676 25 1.51 25h23.98c.833 0 1.51-.663 1.51-1.482v-7.062L24.3 5.093z"/>
     <path d="M24.3 5.093c-.218-.76-.54-1.187-1.208-1.187h-4.856l1.018 1.18h3.948l2.043 11.038h-7.193v2.728H9.114v-2.725h-7.36l2.66-11.04h3.33l1.018-1.18H3.907c-.668 0-1.06.46-1.21 1.186L0 16.456v7.062C0 24.338.676 25 1.51 25h23.98c.833 0 1.51-.663 1.51-1.482v-7.062L24.3 5.093z"/>
   </svg>`
   </svg>`
 }
 }
 
 
-export function closeIcon () {
+function closeIcon () {
   return html`<svg class="UppyIcon" width="14px" height="14px" viewBox="0 0 19 19">
   return html`<svg class="UppyIcon" width="14px" height="14px" viewBox="0 0 19 19">
     <path d="M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"/>
     <path d="M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"/>
   </svg>`
   </svg>`
 }
 }
 
 
-export function pluginIcon () {
+function pluginIcon () {
   return html`<svg class="UppyIcon" width="16px" height="16px" viewBox="0 0 32 30">
   return html`<svg class="UppyIcon" width="16px" height="16px" viewBox="0 0 32 30">
       <path d="M6.6209894,11.1451162 C6.6823051,11.2751669 6.81374248,11.3572188 6.95463813,11.3572188 L12.6925482,11.3572188 L12.6925482,16.0630427 C12.6925482,17.880509 14.1726048,18.75 16.0000083,18.75 C17.8261072,18.75 19.3074684,17.8801847 19.3074684,16.0630427 L19.3074684,11.3572188 L25.0437478,11.3572188 C25.1875787,11.3572188 25.3164069,11.2751669 25.3790272,11.1451162 C25.4370814,11.0173358 25.4171865,10.8642587 25.3252129,10.7562615 L16.278212,0.127131837 C16.2093949,0.0463771751 16.1069846,0 15.9996822,0 C15.8910751,0 15.7886648,0.0463771751 15.718217,0.127131837 L6.6761083,10.7559371 C6.58250402,10.8642587 6.56293518,11.0173358 6.6209894,11.1451162 L6.6209894,11.1451162 Z"/>
       <path d="M6.6209894,11.1451162 C6.6823051,11.2751669 6.81374248,11.3572188 6.95463813,11.3572188 L12.6925482,11.3572188 L12.6925482,16.0630427 C12.6925482,17.880509 14.1726048,18.75 16.0000083,18.75 C17.8261072,18.75 19.3074684,17.8801847 19.3074684,16.0630427 L19.3074684,11.3572188 L25.0437478,11.3572188 C25.1875787,11.3572188 25.3164069,11.2751669 25.3790272,11.1451162 C25.4370814,11.0173358 25.4171865,10.8642587 25.3252129,10.7562615 L16.278212,0.127131837 C16.2093949,0.0463771751 16.1069846,0 15.9996822,0 C15.8910751,0 15.7886648,0.0463771751 15.718217,0.127131837 L6.6761083,10.7559371 C6.58250402,10.8642587 6.56293518,11.0173358 6.6209894,11.1451162 L6.6209894,11.1451162 Z"/>
       <path d="M28.8008722,6.11142645 C28.5417891,5.19831555 28.1583331,4.6875 27.3684848,4.6875 L21.6124454,4.6875 L22.8190234,6.10307874 L27.4986725,6.10307874 L29.9195817,19.3486449 L21.3943891,19.3502502 L21.3943891,22.622552 L10.8023461,22.622552 L10.8023461,19.3524977 L2.07815702,19.3534609 L5.22979699,6.10307874 L9.17871529,6.10307874 L10.3840011,4.6875 L4.6308691,4.6875 C3.83940559,4.6875 3.37421888,5.2390909 3.19815864,6.11142645 L0,19.7470874 L0,28.2212959 C0,29.2043992 0.801477937,30 1.78870751,30 L30.2096773,30 C31.198199,30 32,29.2043992 32,28.2212959 L32,19.7470874 L28.8008722,6.11142645 L28.8008722,6.11142645 Z"/>
       <path d="M28.8008722,6.11142645 C28.5417891,5.19831555 28.1583331,4.6875 27.3684848,4.6875 L21.6124454,4.6875 L22.8190234,6.10307874 L27.4986725,6.10307874 L29.9195817,19.3486449 L21.3943891,19.3502502 L21.3943891,22.622552 L10.8023461,22.622552 L10.8023461,19.3524977 L2.07815702,19.3534609 L5.22979699,6.10307874 L9.17871529,6.10307874 L10.3840011,4.6875 L4.6308691,4.6875 C3.83940559,4.6875 3.37421888,5.2390909 3.19815864,6.11142645 L0,19.7470874 L0,28.2212959 C0,29.2043992 0.801477937,30 1.78870751,30 L30.2096773,30 C31.198199,30 32,29.2043992 32,28.2212959 L32,19.7470874 L28.8008722,6.11142645 L28.8008722,6.11142645 Z"/>
     </svg>`
     </svg>`
 }
 }
 
 
-export function checkIcon () {
+function checkIcon () {
   return html`<svg class="UppyIcon UppyIcon-check" width="13px" height="9px" viewBox="0 0 13 9">
   return html`<svg class="UppyIcon UppyIcon-check" width="13px" height="9px" viewBox="0 0 13 9">
     <polygon points="5 7.293 1.354 3.647 0.646 4.354 5 8.707 12.354 1.354 11.646 0.647"></polygon>
     <polygon points="5 7.293 1.354 3.647 0.646 4.354 5 8.707 12.354 1.354 11.646 0.647"></polygon>
   </svg>`
   </svg>`
 }
 }
 
 
-export function iconAudio () {
+function iconAudio () {
   return html`<svg class="UppyIcon" width="34" height="91" viewBox="0 0 34 91">
   return html`<svg class="UppyIcon" width="34" height="91" viewBox="0 0 34 91">
     <path d="M22.366 43.134V29.33c5.892-6.588 10.986-14.507 10.986-22.183 0-4.114-2.986-7.1-7.1-7.1-3.914 0-7.1 3.186-7.1 7.1v20.936a92.562 92.562 0 0 1-5.728 5.677l-.384.348C4.643 41.762.428 45.604.428 54.802c0 8.866 7.214 16.08 16.08 16.08.902 0 1.784-.074 2.644-.216v11.26c0 2.702-2.198 4.9-4.9 4.9a4.855 4.855 0 0 1-2.95-1.015c2.364-.24 4.222-2.218 4.222-4.643a4.698 4.698 0 0 0-4.692-4.692 4.738 4.738 0 0 0-4.213 2.628c-.923 1.874-.56 4.386.277 6.228a7.82 7.82 0 0 0 .9 1.502 8.178 8.178 0 0 0 4.23 2.896c.723.207 1.474.31 2.226.31 4.474 0 8.113-3.64 8.113-8.113V69.78c5.98-2.345 10.225-8.176 10.225-14.977 0-5.975-4.464-10.876-10.224-11.67zm0-35.987a3.89 3.89 0 0 1 3.887-3.885c1.933 0 3.885 1.202 3.885 3.885 0 4.95-2.702 10.862-7.772 17.204V7.148zM16.51 67.67c-7.096 0-12.867-5.77-12.867-12.867 0-7.78 3.385-10.865 11.563-18.32l.384-.35c1.166-1.064 2.365-2.2 3.562-3.402v10.404c-5.758.793-10.223 5.695-10.223 11.67 0 3.935 1.948 7.603 5.212 9.81a1.605 1.605 0 1 0 1.8-2.66 8.622 8.622 0 0 1-3.8-7.15c0-4.2 3.025-7.7 7.01-8.456v21.05c-.853.178-1.736.272-2.642.272zm5.856-1.412v-19.91c3.985.756 7.01 4.253 7.01 8.455 0 4.987-2.85 9.32-7.01 11.455z" />
     <path d="M22.366 43.134V29.33c5.892-6.588 10.986-14.507 10.986-22.183 0-4.114-2.986-7.1-7.1-7.1-3.914 0-7.1 3.186-7.1 7.1v20.936a92.562 92.562 0 0 1-5.728 5.677l-.384.348C4.643 41.762.428 45.604.428 54.802c0 8.866 7.214 16.08 16.08 16.08.902 0 1.784-.074 2.644-.216v11.26c0 2.702-2.198 4.9-4.9 4.9a4.855 4.855 0 0 1-2.95-1.015c2.364-.24 4.222-2.218 4.222-4.643a4.698 4.698 0 0 0-4.692-4.692 4.738 4.738 0 0 0-4.213 2.628c-.923 1.874-.56 4.386.277 6.228a7.82 7.82 0 0 0 .9 1.502 8.178 8.178 0 0 0 4.23 2.896c.723.207 1.474.31 2.226.31 4.474 0 8.113-3.64 8.113-8.113V69.78c5.98-2.345 10.225-8.176 10.225-14.977 0-5.975-4.464-10.876-10.224-11.67zm0-35.987a3.89 3.89 0 0 1 3.887-3.885c1.933 0 3.885 1.202 3.885 3.885 0 4.95-2.702 10.862-7.772 17.204V7.148zM16.51 67.67c-7.096 0-12.867-5.77-12.867-12.867 0-7.78 3.385-10.865 11.563-18.32l.384-.35c1.166-1.064 2.365-2.2 3.562-3.402v10.404c-5.758.793-10.223 5.695-10.223 11.67 0 3.935 1.948 7.603 5.212 9.81a1.605 1.605 0 1 0 1.8-2.66 8.622 8.622 0 0 1-3.8-7.15c0-4.2 3.025-7.7 7.01-8.456v21.05c-.853.178-1.736.272-2.642.272zm5.856-1.412v-19.91c3.985.756 7.01 4.253 7.01 8.455 0 4.987-2.85 9.32-7.01 11.455z" />
   </svg>`
   </svg>`
 }
 }
 
 
-export function iconFile () {
+function iconFile () {
   return html`<svg class="UppyIcon" width="44" height="58" viewBox="0 0 44 58">
   return html`<svg class="UppyIcon" width="44" height="58" viewBox="0 0 44 58">
     <path d="M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z" />
     <path d="M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z" />
   </svg>`
   </svg>`
 }
 }
 
 
-export function iconText () {
+function iconText () {
   return html`<svg class="UppyIcon" width="50" height="63" viewBox="0 0 50 63">
   return html`<svg class="UppyIcon" width="50" height="63" viewBox="0 0 50 63">
     <path d="M0 .5v15.617h6.25l1.7-5.1a6.242 6.242 0 0 1 5.933-4.267h8V50.5c0 3.45-2.8 6.25-6.25 6.25H12.5V63h25v-6.25h-3.133c-3.45 0-6.25-2.8-6.25-6.25V6.75h8a6.257 6.257 0 0 1 5.933 4.267l1.7 5.1H50V.5H0z" />
     <path d="M0 .5v15.617h6.25l1.7-5.1a6.242 6.242 0 0 1 5.933-4.267h8V50.5c0 3.45-2.8 6.25-6.25 6.25H12.5V63h25v-6.25h-3.133c-3.45 0-6.25-2.8-6.25-6.25V6.75h8a6.257 6.257 0 0 1 5.933 4.267l1.7 5.1H50V.5H0z" />
   </svg>`
   </svg>`
 }
 }
 
 
-// export function removeIcon () {
-//   return html `<svg class="UppyIcon" width="22" height="21" viewBox="0 0 18 17">
-//     <ellipse cx="8.62" cy="8.383" rx="8.62" ry="8.383"/>
-//     <path stroke="#FFF" fill="#FFF" d="M11 6.147L10.85 6 8.5 8.284 6.15 6 6 6.147 8.35 8.43 6 10.717l.15.146L8.5 8.578l2.35 2.284.15-.146L8.65 8.43z"/>
-//   </svg>`
-// }
-
-export function uploadIcon () {
+function uploadIcon () {
   return html`<svg class="UppyIcon" width="37" height="33" viewBox="0 0 37 33">
   return html`<svg class="UppyIcon" width="37" height="33" viewBox="0 0 37 33">
     <path d="M29.107 24.5c4.07 0 7.393-3.355 7.393-7.442 0-3.994-3.105-7.307-7.012-7.502l.468.415C29.02 4.52 24.34.5 18.886.5c-4.348 0-8.27 2.522-10.138 6.506l.446-.288C4.394 6.782.5 10.758.5 15.608c0 4.924 3.906 8.892 8.76 8.892h4.872c.635 0 1.095-.467 1.095-1.104 0-.636-.46-1.103-1.095-1.103H9.26c-3.644 0-6.63-3.035-6.63-6.744 0-3.71 2.926-6.685 6.57-6.685h.964l.14-.28.177-.362c1.477-3.4 4.744-5.576 8.347-5.576 4.58 0 8.45 3.452 9.01 8.072l.06.536.05.446h1.101c2.87 0 5.204 2.37 5.204 5.295s-2.333 5.296-5.204 5.296h-6.062c-.634 0-1.094.467-1.094 1.103 0 .637.46 1.104 1.094 1.104h6.12z"/>
     <path d="M29.107 24.5c4.07 0 7.393-3.355 7.393-7.442 0-3.994-3.105-7.307-7.012-7.502l.468.415C29.02 4.52 24.34.5 18.886.5c-4.348 0-8.27 2.522-10.138 6.506l.446-.288C4.394 6.782.5 10.758.5 15.608c0 4.924 3.906 8.892 8.76 8.892h4.872c.635 0 1.095-.467 1.095-1.104 0-.636-.46-1.103-1.095-1.103H9.26c-3.644 0-6.63-3.035-6.63-6.744 0-3.71 2.926-6.685 6.57-6.685h.964l.14-.28.177-.362c1.477-3.4 4.744-5.576 8.347-5.576 4.58 0 8.45 3.452 9.01 8.072l.06.536.05.446h1.101c2.87 0 5.204 2.37 5.204 5.295s-2.333 5.296-5.204 5.296h-6.062c-.634 0-1.094.467-1.094 1.103 0 .637.46 1.104 1.094 1.104h6.12z"/>
     <path d="M23.196 18.92l-4.828-5.258-.366-.4-.368.398-4.828 5.196a1.13 1.13 0 0 0 0 1.546c.428.46 1.11.46 1.537 0l3.45-3.71-.868-.34v15.03c0 .64.445 1.118 1.075 1.118.63 0 1.075-.48 1.075-1.12V16.35l-.867.34 3.45 3.712a1 1 0 0 0 .767.345 1 1 0 0 0 .77-.345c.416-.33.416-1.036 0-1.485v.003z"/>
     <path d="M23.196 18.92l-4.828-5.258-.366-.4-.368.398-4.828 5.196a1.13 1.13 0 0 0 0 1.546c.428.46 1.11.46 1.537 0l3.45-3.71-.868-.34v15.03c0 .64.445 1.118 1.075 1.118.63 0 1.075-.48 1.075-1.12V16.35l-.867.34 3.45 3.712a1 1 0 0 0 .767.345 1 1 0 0 0 .77-.345c.416-.33.416-1.036 0-1.485v.003z"/>
   </svg>`
   </svg>`
 }
 }
 
 
-export function dashboardBgIcon () {
+function dashboardBgIcon () {
   return html`<svg class="UppyIcon" width="48" height="69" viewBox="0 0 48 69">
   return html`<svg class="UppyIcon" width="48" height="69" viewBox="0 0 48 69">
     <path d="M.5 1.5h5zM10.5 1.5h5zM20.5 1.5h5zM30.504 1.5h5zM45.5 11.5v5zM45.5 21.5v5zM45.5 31.5v5zM45.5 41.502v5zM45.5 51.502v5zM45.5 61.5v5zM45.5 66.502h-4.998zM35.503 66.502h-5zM25.5 66.502h-5zM15.5 66.502h-5zM5.5 66.502h-5zM.5 66.502v-5zM.5 56.502v-5zM.5 46.503V41.5zM.5 36.5v-5zM.5 26.5v-5zM.5 16.5v-5zM.5 6.5V1.498zM44.807 11H36V2.195z"/>
     <path d="M.5 1.5h5zM10.5 1.5h5zM20.5 1.5h5zM30.504 1.5h5zM45.5 11.5v5zM45.5 21.5v5zM45.5 31.5v5zM45.5 41.502v5zM45.5 51.502v5zM45.5 61.5v5zM45.5 66.502h-4.998zM35.503 66.502h-5zM25.5 66.502h-5zM15.5 66.502h-5zM5.5 66.502h-5zM.5 66.502v-5zM.5 56.502v-5zM.5 46.503V41.5zM.5 36.5v-5zM.5 26.5v-5zM.5 16.5v-5zM.5 6.5V1.498zM44.807 11H36V2.195z"/>
   </svg>`
   </svg>`
 }
 }
+
+module.exports = {
+  defaultTabIcon,
+  iconCopy,
+  iconResume,
+  iconPause,
+  iconEdit,
+  localIcon,
+  closeIcon,
+  pluginIcon,
+  checkIcon,
+  iconAudio,
+  iconFile,
+  iconText,
+  uploadIcon,
+  dashboardBgIcon
+}

+ 9 - 25
src/plugins/Dashboard/index.js

@@ -1,12 +1,12 @@
-const Plugin = '../Plugin'
-const Translator = '../../core/Translator'
-const dragDrop = 'drag-drop'
-const Dashboard = './Dashboard'
-const getSpeed = require('../../core/Utils').getSpeed
-const getETA = require('../../core/Utils').getETA
-const prettyETA = require('../../core/Utils').prettyETA
-const prettyBytes = 'pretty-bytes'
-const defaultTabIcon = require('./icons').defaultTabIcon
+const Plugin = require('../Plugin')
+const Translator = require('../../core/Translator')
+const dragDrop = require('drag-drop')
+const Dashboard = require('./Dashboard')
+const { getSpeed } = require('../../core/Utils')
+const { getETA } = require('../../core/Utils')
+const { prettyETA } = require('../../core/Utils')
+const prettyBytes = require('pretty-bytes')
+const { defaultTabIcon } = require('./icons')
 
 
 /**
 /**
  * Modal Dialog & Dashboard
  * Modal Dialog & Dashboard
@@ -20,22 +20,6 @@ module.exports = class DashboardUI extends Plugin {
 
 
     const defaultLocale = {
     const defaultLocale = {
       strings: {
       strings: {
-        // filesChosen: {
-        //   0: '%{smart_count} file selected',
-        //   1: '%{smart_count} files selected'
-        // },
-        // filesUploaded: {
-        //   0: '%{smart_count} file uploaded',
-        //   1: '%{smart_count} files uploaded'
-        // },
-        // files: {
-        //   0: '%{smart_count} file',
-        //   1: '%{smart_count} files'
-        // },
-        // uploadFiles: {
-        //   0: 'Upload %{smart_count} file',
-        //   1: 'Upload %{smart_count} files'
-        // },
         selectToUpload: 'Select files to upload',
         selectToUpload: 'Select files to upload',
         closeModal: 'Close Modal',
         closeModal: 'Close Modal',
         upload: 'Upload',
         upload: 'Upload',

+ 1 - 8
src/plugins/DragDrop/index.js

@@ -1,6 +1,6 @@
 const Plugin = require('./../Plugin')
 const Plugin = require('./../Plugin')
 const Translator = require('../../core/Translator')
 const Translator = require('../../core/Translator')
-const toArray = require('../../core/Utils').toArray
+const { toArray } = require('../../core/Utils')
 const dragDrop = require('drag-drop')
 const dragDrop = require('drag-drop')
 const html = require('yo-yo')
 const html = require('yo-yo')
 
 
@@ -27,13 +27,6 @@ module.exports = class DragDrop extends Plugin {
         chooseFile: 'Choose a file',
         chooseFile: 'Choose a file',
         orDragDrop: 'or drop it here',
         orDragDrop: 'or drop it here',
         upload: 'Upload'
         upload: 'Upload'
-      },
-
-      pluralize: function (n) {
-        if (n === 1) {
-          return 0
-        }
-        return 1
       }
       }
     }
     }
 
 

+ 6 - 6
src/plugins/Dummy.js

@@ -6,7 +6,7 @@ const html = require('yo-yo')
  * Dummy
  * Dummy
  *
  *
  */
  */
-class Dummy extends Plugin {
+module.exports = class Dummy extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.type = 'acquirer'
     this.type = 'acquirer'
@@ -66,8 +66,8 @@ class Dummy extends Plugin {
   }
   }
 }
 }
 
 
-module.exports = function (core, opts) {
-  if (!(this instanceof Dummy)) {
-    return new Dummy(core, opts)
-  }
-}
+// module.exports = function (core, opts) {
+//   if (!(this instanceof Dummy)) {
+//     return new Dummy(core, opts)
+//   }
+// }

+ 5 - 14
src/plugins/FileInput.js

@@ -1,9 +1,9 @@
-import Plugin from './Plugin'
-import Utils from '../core/Utils'
-import Translator from '../core/Translator'
-import html from '../core/html'
+const Plugin = require('./Plugin')
+const Utils = require('../core/Utils')
+const Translator = require('../core/Translator')
+const html = require('yo-yo')
 
 
-export default class FileInput extends Plugin {
+module.exports = class FileInput extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.id = 'FileInput'
     this.id = 'FileInput'
@@ -13,13 +13,6 @@ export default class FileInput extends Plugin {
     const defaultLocale = {
     const defaultLocale = {
       strings: {
       strings: {
         selectToUpload: 'Select to upload'
         selectToUpload: 'Select to upload'
-      },
-
-      pluralize: function (n) {
-        if (n === 1) {
-          return 0
-        }
-        return 1
       }
       }
     }
     }
 
 
@@ -70,14 +63,12 @@ export default class FileInput extends Plugin {
 
 
     return html`<form class="Uppy uppy-FileInput-form">
     return html`<form class="Uppy uppy-FileInput-form">
       ${input}
       ${input}
-
       ${this.opts.pretty
       ${this.opts.pretty
         ? html`<button class="uppy-FileInput-btn" type="button" onclick=${() => input.click()}>
         ? html`<button class="uppy-FileInput-btn" type="button" onclick=${() => input.click()}>
           ${this.i18n('selectToUpload')}
           ${this.i18n('selectToUpload')}
         </button>`
         </button>`
        : null
        : null
      }
      }
-
     </form>`
     </form>`
   }
   }
 
 

+ 2 - 2
src/plugins/GoogleDrive/AuthView.js

@@ -1,6 +1,6 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   const demoLink = props.demo ? html`<a onclick=${props.handleDemoAuth}>Proceed with Demo Account</a>` : null
   const demoLink = props.demo ? html`<a onclick=${props.handleDemoAuth}>Proceed with Demo Account</a>` : null
   return html`
   return html`
     <div class="UppyGoogleDrive-authenticate">
     <div class="UppyGoogleDrive-authenticate">

+ 2 - 2
src/plugins/GoogleDrive/Breadcrumb.js

@@ -1,6 +1,6 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <li>
     <li>
       <button onclick=${props.getNextFolder}>${props.title}</button>
       <button onclick=${props.getNextFolder}>${props.title}</button>

+ 3 - 3
src/plugins/GoogleDrive/Breadcrumbs.js

@@ -1,7 +1,7 @@
-import html from '../../core/html'
-import Breadcrumb from './Breadcrumb'
+const html = require('yo-yo')
+const Breadcrumb = require('./Breadcrumb')
 
 
-export default (props) => {
+module.exports = (props) => {
   console.log(props.directories)
   console.log(props.directories)
   return html`
   return html`
     <ul class="UppyGoogleDrive-breadcrumbs">
     <ul class="UppyGoogleDrive-breadcrumbs">

+ 4 - 4
src/plugins/GoogleDrive/Browser.js

@@ -1,8 +1,8 @@
-import html from '../../core/html'
-import Sidebar from './Sidebar'
-import Table from './Table'
+const html = require('yo-yo')
+const Sidebar = require('./Sidebar')
+const Table = require('./Table')
 
 
-export default (props, bus) => {
+module.exports = (props, bus) => {
   let filteredFolders = props.folders
   let filteredFolders = props.folders
   let filteredFiles = props.files
   let filteredFiles = props.files
 
 

+ 2 - 2
src/plugins/GoogleDrive/Error.js

@@ -1,6 +1,6 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <div>
     <div>
       <span>
       <span>

+ 2 - 2
src/plugins/GoogleDrive/Sidebar.js

@@ -1,6 +1,6 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <ul class="UppyGoogleDrive-sidebar">
     <ul class="UppyGoogleDrive-sidebar">
       <li class="UppyGoogleDrive-filter"><input class="UppyGoogleDrive-focusInput" type='text' onkeyup=${props.filterQuery} placeholder="Search.." value=${props.filterInput}/></li>
       <li class="UppyGoogleDrive-filter"><input class="UppyGoogleDrive-focusInput" type='text' onkeyup=${props.filterQuery} placeholder="Search.." value=${props.filterInput}/></li>

+ 3 - 3
src/plugins/GoogleDrive/Table.js

@@ -1,7 +1,7 @@
-import html from '../../core/html'
-import TableRow from './TableRow'
+const html = require('yo-yo')
+const TableRow = require('./TableRow')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <table class="UppyGoogleDrive-browser">
     <table class="UppyGoogleDrive-browser">
       <thead>
       <thead>

+ 2 - 2
src/plugins/GoogleDrive/TableRow.js

@@ -1,6 +1,6 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <tr class=${props.active ? 'is-active' : ''}
     <tr class=${props.active ? 'is-active' : ''}
       onclick=${props.handleClick}
       onclick=${props.handleClick}

+ 9 - 9
src/plugins/GoogleDrive/index.js

@@ -1,15 +1,15 @@
-import Utils from '../../core/Utils'
-import Plugin from '../Plugin'
-import 'whatwg-fetch'
-import html from '../../core/html'
+const html = require('yo-yo')
+require('whatwg-fetch')
+const Utils = require('../../core/Utils')
+const Plugin = require('../Plugin')
 
 
-import Provider from '../../uppy-base/src/plugins/Provider'
+const Provider = require('../../uppy-base/src/plugins/Provider')
 
 
-import AuthView from './AuthView'
-import Browser from './new/Browser'
-import ErrorView from './Error'
+const AuthView = require('./AuthView')
+const Browser = require('./new/Browser')
+const ErrorView = require('./Error')
 
 
-export default class Google extends Plugin {
+module.exports = class Google extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.type = 'acquirer'
     this.type = 'acquirer'

+ 2 - 2
src/plugins/GoogleDrive/new/Breadcrumb.js

@@ -1,6 +1,6 @@
-import html from '../../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <li>
     <li>
       <button onclick=${props.getNextFolder}>${props.title}</button>
       <button onclick=${props.getNextFolder}>${props.title}</button>

+ 3 - 3
src/plugins/GoogleDrive/new/Breadcrumbs.js

@@ -1,7 +1,7 @@
-import html from '../../../core/html'
-import Breadcrumb from './Breadcrumb'
+const html = require('yo-yo')
+const Breadcrumb = require('./Breadcrumb')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <ul class="UppyGoogleDrive-breadcrumbs">
     <ul class="UppyGoogleDrive-breadcrumbs">
       ${
       ${

+ 4 - 4
src/plugins/GoogleDrive/new/Browser.js

@@ -1,8 +1,8 @@
-import html from '../../../core/html'
-import Breadcrumbs from './Breadcrumbs'
-import Table from './Table'
+const html = require('yo-yo')
+const Breadcrumbs = require('./Breadcrumbs')
+const Table = require('./Table')
 
 
-export default (props) => {
+module.exports = (props) => {
   let filteredFolders = props.folders
   let filteredFolders = props.folders
   let filteredFiles = props.files
   let filteredFiles = props.files
 
 

+ 3 - 3
src/plugins/GoogleDrive/new/Table.js

@@ -1,7 +1,7 @@
-import html from '../../../core/html'
-import Row from './TableRow'
+const html = require('yo-yo')
+const Row = require('./TableRow')
 
 
-export default (props) => {
+module.exports = (props) => {
   const headers = props.columns.map((column) => {
   const headers = props.columns.map((column) => {
     return html`
     return html`
       <th class="BrowserTable-headerColumn BrowserTable-column" onclick=${props.sortByTitle}>
       <th class="BrowserTable-headerColumn BrowserTable-column" onclick=${props.sortByTitle}>

+ 2 - 2
src/plugins/GoogleDrive/new/TableColumn.js

@@ -1,6 +1,6 @@
-import html from '../../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <td class="BrowserTable-rowColumn BrowserTable-column">
     <td class="BrowserTable-rowColumn BrowserTable-column">
       <img src=${props.iconLink}/> ${props.value}
       <img src=${props.iconLink}/> ${props.value}

+ 3 - 3
src/plugins/GoogleDrive/new/TableRow.js

@@ -1,7 +1,7 @@
-import html from '../../../core/html'
-import Column from './TableColumn'
+const html = require('yo-yo')
+const Column = require('./TableColumn')
 
 
-export default (props) => {
+module.exports = (props) => {
   const classes = props.active ? 'BrowserTable-row is-active' : 'BrowserTable-row'
   const classes = props.active ? 'BrowserTable-row is-active' : 'BrowserTable-row'
   return html`
   return html`
     <tr onclick=${props.handleClick} ondblclick=${props.handleDoubleClick} class=${classes}>
     <tr onclick=${props.handleClick} ondblclick=${props.handleDoubleClick} class=${classes}>

+ 4 - 4
src/plugins/Informer.js

@@ -1,5 +1,5 @@
-import Plugin from './Plugin'
-import html from '../core/html'
+const Plugin = require('./Plugin')
+const html = require('yo-yo')
 
 
 /**
 /**
  * Informer
  * Informer
@@ -8,7 +8,7 @@ import html from '../core/html'
  * or for errors: `bus.emit('informer', 'Error uploading img.jpg', 'error', 5000)`
  * or for errors: `bus.emit('informer', 'Error uploading img.jpg', 'error', 5000)`
  *
  *
  */
  */
-export default class Informer extends Plugin {
+module.exports = class Informer extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.type = 'progressindicator'
     this.type = 'progressindicator'
@@ -82,7 +82,7 @@ export default class Informer extends Plugin {
       this.showInformer(msg, type, duration)
       this.showInformer(msg, type, duration)
     })
     })
 
 
-    bus.on('informer-hide', () => {
+    bus.on('informer:hide', () => {
       this.hideInformer()
       this.hideInformer()
     })
     })
 
 

+ 2 - 2
src/plugins/MagicLog.js

@@ -1,4 +1,4 @@
-import Plugin from './Plugin'
+const Plugin = require('./Plugin')
 // import deepDiff from 'deep-diff'
 // import deepDiff from 'deep-diff'
 
 
 /**
 /**
@@ -7,7 +7,7 @@ import Plugin from './Plugin'
  * inspired by https://github.com/yoshuawuyts/choo-log
  * inspired by https://github.com/yoshuawuyts/choo-log
  *
  *
  */
  */
-export default class MagicLog extends Plugin {
+module.exports = class MagicLog extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.type = 'debugger'
     this.type = 'debugger'

+ 2 - 2
src/plugins/MetaData.js

@@ -1,11 +1,11 @@
-import Plugin from './Plugin'
+const Plugin = require('./Plugin')
 
 
 /**
 /**
  * Meta Data
  * Meta Data
  * Adds metadata fields to Uppy
  * Adds metadata fields to Uppy
  *
  *
  */
  */
-export default class MetaData extends Plugin {
+module.exports = class MetaData extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.type = 'modifier'
     this.type = 'modifier'

+ 2 - 2
src/plugins/Multipart.js

@@ -1,6 +1,6 @@
-import Plugin from './Plugin'
+const Plugin = require('./Plugin')
 
 
-export default class Multipart extends Plugin {
+module.exports = class Multipart extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.type = 'uploader'
     this.type = 'uploader'

+ 2 - 2
src/plugins/PersistentState.js

@@ -1,4 +1,4 @@
-import Plugin from './Plugin'
+const Plugin = require('./Plugin')
 // import deepDiff from 'deep-diff'
 // import deepDiff from 'deep-diff'
 
 
 /**
 /**
@@ -9,7 +9,7 @@ import Plugin from './Plugin'
  * in your localStorage, using the devTools
  * in your localStorage, using the devTools
  *
  *
  */
  */
-export default class PersistentState extends Plugin {
+module.exports = class PersistentState extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.type = 'debugger'
     this.type = 'debugger'

+ 3 - 3
src/plugins/ProgressBar.js

@@ -1,11 +1,11 @@
-import Plugin from './Plugin'
-import html from '../core/html'
+const Plugin = require('./Plugin')
+const html = require('yo-yo')
 
 
 /**
 /**
  * Progress bar
  * Progress bar
  *
  *
  */
  */
-export default class ProgressBar extends Plugin {
+module.exports = class ProgressBar extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.id = 'ProgressBar'
     this.id = 'ProgressBar'

+ 4 - 4
src/plugins/Tus10.js

@@ -1,12 +1,12 @@
-import Plugin from './Plugin'
-import tus from 'tus-js-client'
-import UppySocket from '../core/UppySocket'
+const Plugin = require('./Plugin')
+const tus = require('tus-js-client')
+const UppySocket = require('../core/UppySocket')
 
 
 /**
 /**
  * Tus resumable file uploader
  * Tus resumable file uploader
  *
  *
  */
  */
-export default class Tus10 extends Plugin {
+module.exports = class Tus10 extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.type = 'uploader'
     this.type = 'uploader'

+ 4 - 6
src/plugins/Webcam/CameraIcon.js

@@ -1,10 +1,8 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`<svg class="UppyIcon" width="100" height="77" viewBox="0 0 100 77">
   return html`<svg class="UppyIcon" width="100" height="77" viewBox="0 0 100 77">
-    <g>
-      <path d="M50 32c-7.168 0-13 5.832-13 13s5.832 13 13 13 13-5.832 13-13-5.832-13-13-13z"/>
-      <path d="M87 13H72c0-7.18-5.82-13-13-13H41c-7.18 0-13 5.82-13 13H13C5.82 13 0 18.82 0 26v38c0 7.18 5.82 13 13 13h74c7.18 0 13-5.82 13-13V26c0-7.18-5.82-13-13-13zM50 68c-12.683 0-23-10.318-23-23s10.317-23 23-23 23 10.318 23 23-10.317 23-23 23z"/>
-    <g>
+    <path d="M50 32c-7.168 0-13 5.832-13 13s5.832 13 13 13 13-5.832 13-13-5.832-13-13-13z"/>
+    <path d="M87 13H72c0-7.18-5.82-13-13-13H41c-7.18 0-13 5.82-13 13H13C5.82 13 0 18.82 0 26v38c0 7.18 5.82 13 13 13h74c7.18 0 13-5.82 13-13V26c0-7.18-5.82-13-13-13zM50 68c-12.683 0-23-10.318-23-23s10.317-23 23-23 23 10.318 23 23-10.317 23-23 23z"/>
   </svg>`
   </svg>`
 }
 }

+ 3 - 3
src/plugins/Webcam/CameraScreen.js

@@ -1,7 +1,7 @@
-import html from '../../core/html'
-import CameraIcon from './CameraIcon'
+const html = require('yo-yo')
+const CameraIcon = require('./CameraIcon')
 
 
-export default (props) => {
+module.exports = (props) => {
   const src = props.src || ''
   const src = props.src || ''
   let video
   let video
 
 

+ 2 - 2
src/plugins/Webcam/PermissionsScreen.js

@@ -1,6 +1,6 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <div>
     <div>
       <h1>Please allow access to your camera</h1>
       <h1>Please allow access to your camera</h1>

+ 4 - 6
src/plugins/Webcam/WebcamIcon.js

@@ -1,12 +1,10 @@
-import html from '../../core/html'
+const html = require('yo-yo')
 
 
-export default (props) => {
+module.exports = (props) => {
   return html`
   return html`
     <svg class="UppyIcon UppyModalTab-icon" width="18" height="21" viewBox="0 0 18 21">
     <svg class="UppyIcon UppyModalTab-icon" width="18" height="21" viewBox="0 0 18 21">
-      <g>
-        <path d="M14.8 16.9c1.9-1.7 3.2-4.1 3.2-6.9 0-5-4-9-9-9s-9 4-9 9c0 2.8 1.2 5.2 3.2 6.9C1.9 17.9.5 19.4 0 21h3c1-1.9 11-1.9 12 0h3c-.5-1.6-1.9-3.1-3.2-4.1zM9 4c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6 2.7-6 6-6z"/>
-        <path d="M9 14c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zM8 8c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1c0-.5.4-1 1-1z"/>
-      </g>
+      <path d="M14.8 16.9c1.9-1.7 3.2-4.1 3.2-6.9 0-5-4-9-9-9s-9 4-9 9c0 2.8 1.2 5.2 3.2 6.9C1.9 17.9.5 19.4 0 21h3c1-1.9 11-1.9 12 0h3c-.5-1.6-1.9-3.1-3.2-4.1zM9 4c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6 2.7-6 6-6z"/>
+      <path d="M9 14c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zM8 8c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1c0-.5.4-1 1-1z"/>
     </svg>
     </svg>
   `
   `
 }
 }

+ 7 - 7
src/plugins/Webcam/index.js

@@ -1,14 +1,14 @@
-import Plugin from '../Plugin'
-import WebcamProvider from '../../uppy-base/src/plugins/Webcam'
-import { extend } from '../../core/Utils'
-import WebcamIcon from './WebcamIcon'
-import CameraScreen from './CameraScreen'
-import PermissionsScreen from './PermissionsScreen'
+const Plugin = require('../Plugin')
+const WebcamProvider = require('../../uppy-base/src/plugins/Webcam')
+const { extend } = require('../../core/Utils')
+const WebcamIcon = require('./WebcamIcon')
+const CameraScreen = require('./CameraScreen')
+const PermissionsScreen = require('./PermissionsScreen')
 
 
 /**
 /**
  * Webcam
  * Webcam
  */
  */
-export default class Webcam extends Plugin {
+module.exports = class Webcam extends Plugin {
   constructor (core, opts) {
   constructor (core, opts) {
     super(core, opts)
     super(core, opts)
     this.userMedia = true
     this.userMedia = true

+ 41 - 0
src/plugins/_index.js

@@ -0,0 +1,41 @@
+// Parent
+const Plugin = require('./Plugin')
+
+// Orchestrators
+const Dashboard = require('./Dashboard/index.js')
+
+// Acquirers
+const Dummy = require('./Dummy')
+const DragDrop = require('./DragDrop/index.js')
+const FileInput = require('./FileInput')
+const GoogleDrive = require('./GoogleDrive/index.js')
+const Webcam = require('./Webcam/index.js')
+
+// Progressindicators
+const ProgressBar = require('./ProgressBar.js')
+const Informer = require('./Informer.js')
+
+// Uploaders
+const Tus10 = require('./Tus10')
+const Multipart = require('./Multipart')
+
+// Presenters
+// import Present from './Present'
+
+// Presetters
+// import TransloaditBasic from './TransloaditBasic'
+
+module.exports = {
+  Plugin,
+  Dummy,
+  ProgressBar,
+  Informer,
+  DragDrop,
+  GoogleDrive,
+  FileInput,
+  Tus10,
+  Multipart,
+  // TransloaditBasic,
+  Dashboard,
+  Webcam
+}

+ 0 - 42
src/plugins/index.js

@@ -1,42 +0,0 @@
-// Parent
-import Plugin from './Plugin'
-
-// Orchestrators
-import Dashboard from './Dashboard/index.js'
-
-// Acquirers
-import Dummy from './Dummy'
-import DragDrop from './DragDrop/index.js'
-import FileInput from './FileInput'
-import GoogleDrive from './GoogleDrive/index.js'
-import Webcam from './Webcam/index.js'
-
-// Progressindicators
-import ProgressBar from './ProgressBar.js'
-import Informer from './Informer.js'
-// import Spinner from './Spinner'
-
-// Uploaders
-import Tus10 from './Tus10'
-import Multipart from './Multipart'
-
-// Presenters
-// import Present from './Present'
-
-// Presetters
-// import TransloaditBasic from './TransloaditBasic'
-
-export default {
-  Plugin,
-  Dummy,
-  ProgressBar,
-  Informer,
-  DragDrop,
-  GoogleDrive,
-  FileInput,
-  Tus10,
-  Multipart,
-  // TransloaditBasic,
-  Dashboard,
-  Webcam
-}

+ 5 - 5
src/uppy-base/src/index.js

@@ -1,9 +1,9 @@
-import Multipart from './plugins/Multipart'
-import Provider from './plugins/Provider'
-import Tus10 from './plugins/Tus10'
-import Webcam from './plugins/Webcam'
+const Multipart = require('./plugins/Multipart')
+const Provider = require('./plugins/Provider')
+const Tus10 = require('./plugins/Tus10')
+const Webcam = require('./plugins/Webcam')
 
 
-export {
+module.exports = {
   Multipart,
   Multipart,
   Provider,
   Provider,
   Tus10,
   Tus10,

+ 2 - 2
src/uppy-base/src/plugins/Multipart.js

@@ -1,8 +1,8 @@
 'use strict'
 'use strict'
 
 
-import EventEmitter from 'events'
+const EventEmitter = require('events')
 
 
-export default class Multipart extends EventEmitter {
+module.exports = class Multipart extends EventEmitter {
   constructor (core, opts) {
   constructor (core, opts) {
     super()
     super()
 
 

+ 1 - 1
src/uppy-base/src/plugins/Provider.js

@@ -4,7 +4,7 @@ const _getName = (id) => {
   return id.split('-').map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(' ')
   return id.split('-').map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(' ')
 }
 }
 
 
-export default class Provider {
+module.exports = class Provider {
   constructor (opts) {
   constructor (opts) {
     this.opts = opts
     this.opts = opts
     this.provider = opts.provider
     this.provider = opts.provider

+ 4 - 4
src/uppy-base/src/plugins/Tus10.js

@@ -1,13 +1,13 @@
 'use strict'
 'use strict'
 
 
-import tus from 'tus-js-client'
-import UppySocket from '../utils/UppySocket'
-import EventEmitter from 'events'
+const tus = require('tus-js-client')
+const UppySocket = require('../utils/UppySocket')
+const EventEmitter = require('events')
 
 
 /**
 /**
  * Tus resumable file uploader
  * Tus resumable file uploader
  */
  */
-export default class Tus10 extends EventEmitter {
+module.exports = class Tus10 extends EventEmitter {
   constructor (opts) {
   constructor (opts) {
     super()
     super()
 
 

+ 2 - 2
src/uppy-base/src/plugins/Webcam.js

@@ -1,11 +1,11 @@
 'use strict'
 'use strict'
 
 
-import dataURItoFile from '../utils/dataURItoFile'
+const dataURItoFile = require('../utils/dataURItoFile')
 
 
 /**
 /**
  * Webcam Plugin
  * Webcam Plugin
  */
  */
-export default class Webcam {
+module.exports = class Webcam {
   constructor (opts = {}, params = {}) {
   constructor (opts = {}, params = {}) {
     this._userMedia
     this._userMedia
     this.userMedia = true
     this.userMedia = true

+ 2 - 2
src/uppy-base/src/utils/UppySocket.js

@@ -1,6 +1,6 @@
-import ee from 'namespace-emitter'
+const ee = require('namespace-emitter')
 
 
-export default class UppySocket {
+module.exports = class UppySocket {
   constructor (opts) {
   constructor (opts) {
     this.queued = []
     this.queued = []
     this.isOpen = false
     this.isOpen = false

+ 1 - 1
src/uppy-base/src/utils/dataURItoFile.js

@@ -24,6 +24,6 @@ function dataURItoBlob (dataURI, opts, toFile) {
   return new Blob([new Uint8Array(array)], {type: mimeType})
   return new Blob([new Uint8Array(array)], {type: mimeType})
 }
 }
 
 
-export default function (dataURI, opts) {
+module.exports = function (dataURI, opts) {
   return dataURItoBlob(dataURI, opts, true)
   return dataURItoBlob(dataURI, opts, true)
 }
 }

+ 1 - 1
src/uppy-base/src/utils/toArray.js

@@ -1,6 +1,6 @@
 /**
 /**
  * Converts list into array
  * Converts list into array
 */
 */
-export function toArray (list) {
+module.exports = function toArray (list) {
   return Array.prototype.slice.call(list || [], 0)
   return Array.prototype.slice.call(list || [], 0)
 }
 }