Sfoglia il codice sorgente

Changed import sources to fix errors

Artur Paikin 9 anni fa
parent
commit
f28804e36a
4 ha cambiato i file con 10 aggiunte e 10 eliminazioni
  1. 2 2
      examples/playground/src/js/app.js
  2. 1 1
      package.json
  3. 6 6
      src/core/Transloadit.js
  4. 1 1
      src/plugins/DragDrop.js

+ 2 - 2
examples/playground/src/js/app.js

@@ -1,5 +1,5 @@
-import Transloadit from '../../../../core';
-import { DragDrop, Tus10 } from '../../../../plugins';
+import Transloadit from '../../../../src/core';
+import { DragDrop, Tus10 } from '../../../../src/plugins';
 
 const transloadit = new Transloadit({wait: false});
 const files = transloadit

+ 1 - 1
package.json

@@ -13,7 +13,7 @@
     "clean": "rm -rf lib && rm -rf dist",
     "lint": "eslint src/**/*.js",
     "dev": "npm run watch & npm run server",
-    "dev:examples": "npm run watch & npm run server",
+    "dev:examples": "npm run watch:examples & npm run server",
     "server": "browser-sync start --config bs-config.js",
     "test": "bin/test",
     "test:phantom": "zuul test/spec/upload.js --phantom",

+ 6 - 6
src/core/Transloadit.js

@@ -33,13 +33,13 @@ export default class {
       cb    : cb
     });
 
-    // const methods = [];
-    // for (let p in this.plugins[type]) {
-    //   const plugin = this.plugins[type][p];
-    //   methods.push(plugin.run.bind(plugin, files));
-    // }
+    const methods = [];
+    for (let p in this.plugins[type]) {
+      const plugin = this.plugins[type][p];
+      methods.push(plugin.run.bind(plugin, files));
+    }
 
-    const methods = this.plugins[type].map(plugin => plugin.run.bind(plugin, files));
+    // const methods = this.plugins[type].map(plugin => plugin.run.bind(plugin, files));
 
     async.parallel(methods, cb);
   }

+ 1 - 1
src/plugins/DragDrop.js

@@ -1,5 +1,5 @@
 import { toggleClass } from '../core/Utils';
-import { TransloaditPlugin } from './';
+import TransloaditPlugin from './TransloaditPlugin';
 console.log('pizza', TransloaditPlugin);
 
 export default class DragDrop extends TransloaditPlugin {