-
-
Notifications
You must be signed in to change notification settings - Fork 3
Developers_Module
Wesley de Groot edited this page Jul 31, 2018
·
7 revisions
_ _____
| | / ____|
| | | (___
_ | | \___ \
______ _ | |__| | ____) |
|______| (_) \____/ |______/
Hi, Welcome, Thanks for visiting this page, and project i hope you'll enjoy.
Create a module if you want to make it a standard module please use _
in the beginning!
Module dir is Modules/
(Since v0.1.0).
/*
_
(_)
_ _____
| | / ____|
| | | (___
_ | | \___ \
______ _ | |__| | ____) |
|______| (_) \____/ |______/
v0.0.7 <-- CHANGE THIS
https://www.github.com/wesdegroot/_.js/
or https://www.wdgwv.com
Git: https://github.com/wesdegroot/_.js
Todo: https://github.com/wesdegroot/_.js/issues
Licence: https://github.com/wesdegroot/_.js/blob/master/LICENCE.md (CC BY 4.0)
Latest: https://raw.githubusercontent.com/wesdegroot/_.js/master/latest/_.js
*/
Please note the CHANGE THIS, Change it to the version you have used to create this module.
Please note for deprecations do not use those functions.
if (typeof _ !== 'function') {
window.alert('Please make sure _.js is loaded!')
} else {
/**
* MYFUNCTIONNAME
*
* MYFUNCTIONNAME Description
*
* @param object object Wrapper
* @example _().MYFUNCTIONNAME()
*/
window._.fn.MYFUNCTIONNAME = function () {
var len = this.length
var fail = false // Example var for "Errors"
while (len--) {
console.log('Text to console: ' + this[len].innerHTML) // EXAMPLE
}
if (fail === true) { // Terrible a error happened?!
window._._error('#MYMODULENAME#MYFUNCTION', 'Need at least one wrapper') // ONLY IF IT IS A STANDARD MODULE
}
}
}
if (typeof _ !== 'function') {
window.alert('Please make sure _.js is loaded!')
} else {
// * MYMODULENAMELib
// *
// * Library for MYMODULENAME
// *
// * @new v0.0.7
// * @see https://github.com/wesdegroot/_.js/wiki/module_MYMODULENAME
// * @var function MYMODULENAMELib
var MYMODULENAMELib = function (params) { }
/**
* MYMODULENAME
*
* MYMODULENAME Description
*
* @param object [object] Wrapper (If it needs the wrapper)
* @see https://github.com/wesdegroot/_.js/wiki/module_MYMODULENAME
* @since _.JSVERSION
*/
window._.fn.MYMODULENAME = MYMODULENAMELib.prototype = {
/**
* MYFUNCTIONNAME
*
* MYFUNCTIONNAME Description
*
* @param object object Wrapper
* @param object data MYDATA PARSER
* @see https://github.com/wesdegroot/_.js/wiki/module_MYMODULENAME#MYFUNCTIONNAME
* @example _. MYFUNCTIONNAME.MYFUNCTIONNAME()
*/
init: function (data) {
if (typeof data === 'object') { // EXAMPLE IF NEEDED A OBJECT!
var len = this.length
while (len--) {
console.log('Text to console: ' + this[len].innerHTML) // EXAMPLE
}
} else {
window._._error('#MYMODULENAME#MYFUNCTION') // ONLY IF IT IS A STANDARD MODULE
}
}
}
}
- Fork this repo (main branch)
- Make updates/modules/fixes/enhancements
- Make a pull request (don't forget to also make a request pull for the 'wiki/developers' page)
- Open a issue with the Module wiki text.
- A Team member will look at your code, and if needed optimize, change links.
- Your pull request will be accepted (or declined)
- Thank you
© Wesley de Groot • CC-BY 4.0 • WDGWV