ソースを参照

Fix export/import for Rollup

Artur Paikin 8 年 前
コミット
64ba012ae7
6 ファイル変更13 行追加21 行削除
  1. 8 16
      example/main.js
  2. 1 1
      package.json
  3. 1 1
      src/locales/en_US.js
  4. 1 1
      src/locales/pt_BR.js
  5. 1 1
      src/locales/ru_RU.js
  6. 1 1
      src/locales/zh_CN.js

+ 8 - 16
example/main.js

@@ -1,10 +1,10 @@
 import Uppy from '../src/core/Core.js'
-import Dashboard from '../src/plugins/Dashboard'
-import Dummy from '../src/plugins/Dummy'
-import GoogleDrive from '../src/plugins/GoogleDrive'
-import ProgressBar from '../src/plugins/ProgressBar'
-import Tus10 from '../src/plugins/Tus10'
-import MetaData from '../src/plugins/MetaData'
+import Dashboard from '../src/plugins/Dashboard/index.js'
+import Dummy from '../src/plugins/Dummy.js'
+import GoogleDrive from '../src/plugins/GoogleDrive/index.js'
+import ProgressBar from '../src/plugins/ProgressBar.js'
+import Tus10 from '../src/plugins/Tus10.js'
+import MetaData from '../src/plugins/MetaData.js'
 
 // import MagicLog from '../src/plugins/MagicLog'
 
@@ -16,16 +16,8 @@ const uppy = new Uppy({debug: true, autoProceed: false})
   .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/', resume: false})
   .use(MetaData, {
     fields: [
-      {
-        name: 'resizeTo',
-        value: 1200,
-        placeholder: 'specify future image size'
-      },
-      {
-        name: 'description',
-        value: '',
-        placeholder: 'describe what the file is for'
-      }
+      { id: 'resizeTo', name: 'Resize to', value: 1200, placeholder: 'specify future image size' },
+      { id: 'description', name: 'Description', value: '', placeholder: 'describe what the file is for' }
     ]
   })
   // .use(MagicLog)

+ 1 - 1
package.json

@@ -39,7 +39,7 @@
     "watch": "npm-run-all --parallel watch:js watch:css",
     "watch:fast": "npm-run-all --parallel watch:css web:preview",
     "watch:example:browsersync": "browser-sync start --server 'example' --port 3452 --serveStatic 'dist' --files 'example/bundle.js, dist/uppy.min.css'",
-    "watch:example:js": "watchify -t ['babelify'] example/main.js -o example/bundle.js -vd",
+    "watch:example:js": "watchify -t 'babelify' example/main.js -o example/bundle.js -vd",
     "watch:example": "npm-run-all --parallel watch:example:js watch:css watch:example:browsersync",
     "web:build": "cd website && node update.js && ./node_modules/.bin/hexo generate --silent && node build-examples.js",
     "web:clean": "cd website && ./node_modules/.bin/hexo clean",

+ 1 - 1
src/locales/en_US.js

@@ -36,4 +36,4 @@ if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') {
   window.Uppy.locales.en_US = en_US
 }
 
-module.exports = en_US
+export default en_US

+ 1 - 1
src/locales/pt_BR.js

@@ -36,4 +36,4 @@ if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') {
   window.Uppy.locales.pt_BR = pt_BR
 }
 
-module.exports = pt_BR
+export default pt_BR

+ 1 - 1
src/locales/ru_RU.js

@@ -28,4 +28,4 @@ if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') {
   window.Uppy.locales.ru_RU = ru_RU
 }
 
-module.exports = ru_RU
+export default ru_RU

+ 1 - 1
src/locales/zh_CN.js

@@ -29,4 +29,4 @@ if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') {
   window.Uppy.locales.zh_CN = zh_CN
 }
 
-module.exports = zh_CN
+export default zh_CN