Last active
February 24, 2016 23:22
-
-
Save frontend-3/55be2881256c97f929de to your computer and use it in GitHub Desktop.
yoson es6 module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
Module mod | |
@class class | |
@main main | |
@author author | |
***/ | |
yOSON.AppCore.addModule('mod_name', Sb => { | |
let st = {}, | |
dom = {}, | |
defaults, | |
events, | |
fn, | |
afterCatchDom, | |
catchDom, | |
suscribeEvents, | |
initialize; | |
defaults = { | |
test: 'test' | |
}; | |
catchDom = () => { | |
}; | |
afterCatchDom = () => { | |
}; | |
suscribeEvents = () => { | |
}; | |
events = { | |
test(e) { | |
fn.test(this); | |
} | |
}; | |
fn = { | |
test(el) { | |
} | |
}; | |
initialize = (opts) => { | |
st = $.extend({}, defaults, opts); | |
catchDom(); | |
afterCatchDom(); | |
suscribeEvents(); | |
}; | |
return { init: initialize }; | |
},[]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment