<NME> main.js
<BEF> import {
  validator,
  setTouchState
} from './utils/helper'
import DEFAULT from './default'
import prepare from './prepare'
import observer from './observer'
import methods from './methods'

const version = __VERSION__

class weCropper {
  constructor (params) {
    const self = this
    const _default = {}
  constructor (params) {
    const self = this
    const _default = {}

    validator(self, DEFAULT)

    Object.keys(DEFAULT).forEach(key => {
      _default[key] = DEFAULT[key].default
    })
    Object.assign(self, _default, params)

    self.prepare()
    self.attachPage()
    self.createCtx()
    self.observer()
    self.cutt()
    self.methods()
    self.init()
    self.update()

    return self
  }

  init () {
    const self = this
    const { src } = self

    self.version = version

    typeof self.onReady === 'function' && self.onReady(self.ctx, self)

    if (src) {
      self.pushOrign(src)
    } else {
      self.updateCanvas()
    }
    setTouchState(self, false, false, false)
  }
}

Object.assign(weCropper.prototype, handle)

weCropper.prototype.prepare = prepare
weCropper.prototype.observer = observer
weCropper.prototype.methods = methods
weCropper.prototype.cutt = cutt
weCropper.prototype.update = update

export default weCropper
WeCropper.prototype.methods = methods
WeCropper.prototype.cutt = cutt
WeCropper.prototype.update = update

export default WeCropper

<MSG> refactor: rename classname

<DFF> @@ -9,7 +9,7 @@ import cutt from './cut'
 
 const version = __VERSION__
 
-class weCropper {
+class WeCropper {
   constructor (params) {
     const self = this
     const _default = {}
@@ -53,12 +53,12 @@ class weCropper {
   }
 }
 
-Object.assign(weCropper.prototype, handle)
+Object.assign(WeCropper.prototype, handle)
 
-weCropper.prototype.prepare = prepare
-weCropper.prototype.observer = observer
-weCropper.prototype.methods = methods
-weCropper.prototype.cutt = cutt
-weCropper.prototype.update = update
+WeCropper.prototype.prepare = prepare
+WeCropper.prototype.observer = observer
+WeCropper.prototype.methods = methods
+WeCropper.prototype.cutt = cutt
+WeCropper.prototype.update = update
 
-export default weCropper
+export default WeCropper

refactor: rename classname