Browse Source

Fixed build example issue

Harry Hedger 9 years ago
parent
commit
d53e010496
6 changed files with 8 additions and 6 deletions
  1. 2 2
      package.json
  2. 1 1
      src/core/index.js
  3. 1 1
      src/plugins/DragDrop.js
  4. 1 1
      src/plugins/TransloaditPlugin.js
  5. 2 1
      src/plugins/Tus10.js
  6. 1 0
      src/plugins/index.js

+ 2 - 2
package.json

@@ -6,7 +6,7 @@
   "scripts": {
     "build": "npm run build:lib && npm run build:umd && npm run build:umd:min && npm run build:css",
     "build:css": "bin/build-css",
-    "build:lib": "rm -rf ./lib && babel src -d lib --stage 0",
+    "build:lib": "babel src -d lib --stage 0",
     "build:umd": "./bin/build-umd",
     "build:umd:min": "./bin/build-umd",
     "build:examples": "examples/buildAll node_modules/.bin/browserify",
@@ -19,7 +19,7 @@
     "test:phantom": "zuul test/spec/upload.js --phantom",
     "watch": "npm run watch:css & npm run watch:js",
     "watch:css": "nodemon -e src/scss -x \"npm run build:css\"",
-    "watch:examples": "examples/buildAll node_modules/.bin/watchify & npm run watch:js",
+    "watch:examples": "(rm -rf lib && npm run build:lib) && (npm run watch:js & examples/buildAll node_modules/.bin/watchify)",
     "watch:js": "nodemon --watch src -e js --ignore src/scss -x \"npm run build:lib\""
   },
   "repository": {

+ 1 - 1
src/core/index.js

@@ -1 +1 @@
-export default from './Transloadit.js'
+export default from './Transloadit'

+ 1 - 1
src/plugins/DragDrop.js

@@ -1,4 +1,4 @@
-import TransloaditPlugin from '../plugins/TransloaditPlugin';
+import { TransloaditPlugin } from './';
 
 // This is how we roll $('.element').toggleClass in non-jQuery world
 function toggleClass(el, className) {

+ 1 - 1
src/plugins/TransloaditPlugin.js

@@ -1,4 +1,4 @@
-export default class TransloaditPlugin {
+export default class {
   // This contains boilerplate that all TransloaditPlugins share - and should not be used
   // directly. It also shows which methods final plugins should implement/override,
   // this deciding on structure.

+ 2 - 1
src/plugins/Tus10.js

@@ -1,4 +1,5 @@
-import TransloaditPlugin from './TransloaditPlugin';
+import { TransloaditPlugin } from './';
+
 export default class Tus10 extends TransloaditPlugin {
   constructor(core, opts) {
     super(core, opts);

+ 1 - 0
src/plugins/index.js

@@ -1,6 +1,7 @@
 import DragDrop from './DragDrop'
 import TransloaditBasic from './TransloaditBasic'
 import Tus10 from './Tus10'
+import TransloaditPlugin from './TransloaditPlugin'
 
 export default {
   DragDrop,