Skip to content

Instantly share code, notes, and snippets.

@frontend-3
Last active February 24, 2016 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frontend-3/55be2881256c97f929de to your computer and use it in GitHub Desktop.
Save frontend-3/55be2881256c97f929de to your computer and use it in GitHub Desktop.
yoson es6 module
/***
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