This commit is contained in:
2023-04-21 02:04:07 +03:00
parent 20eb79d955
commit 9b94c75754
10 changed files with 7758 additions and 5 deletions
+9 -4
View File
@@ -26,7 +26,12 @@ kit.config = kit.config || {};
this.global = global;
this.registerPlugins(plugins);
};
/**
*
* @type {kit.PluginManager|PluginManager}
* @private
*/
var __proto = PluginManager.prototype;
__proto.__checkState = function(pluginId, state){
@@ -50,7 +55,6 @@ kit.config = kit.config || {};
};
/**
*
* @param pluginId
* @param {kitModuleTypeLoader|{}} config
* @return {boolean}
@@ -456,7 +460,7 @@ kit.config = kit.config || {};
if(!this.__checkState(pluginId, stateList.registered)) {
console.warn('PluginManager.require: plugin ' + pluginId + ' is not register');
return false;
return undefined;
}
if(typeof callback !== 'function') {
callback = function(){};
@@ -626,6 +630,7 @@ kit.config = kit.config || {};
debug: false,
defaultPhoneMask: '+7 (999) 999-99-99',
};
var manager = new PluginManager(global);
manager.register('PluginManager', {
alias: 'pm',
@@ -649,7 +654,7 @@ kit.config = kit.config || {};
global.ready = manager.ready.bind(manager);
global.exec = manager.exec.bind(manager);
global.require = manager.require.bind(manager);
/** @type {kitCore} */
/** @type {kit} */
window.__pmGlobal__ = global;
})(kit);
+20 -1
View File
@@ -30,7 +30,7 @@ __PluginManager__.registerPlugins({
},
jQuery: {
path: __pmConfig__.assetsPath + '/jquery',
module: '/jquery.min.js',
module: '/jquery.js',
type: 'loader',
alias: '$',
},
@@ -283,6 +283,25 @@ __PluginManager__.registerPlugins({
js: '/makeCSSAnimations.js',
deps: ['jQuery', 'support'],
},
mCustomScrollbar: {
path: __pmConfig__.assetsPath + '/mCustomScrollbar',
alias: 'malihu-custom-scrollbar-plugin',
js: '/mCustomScrollbar.js',
css: '/jquery.mCustomScrollbar.css',
deps: ['jQuery', 'jqueryMousewheel'],
onInstall: function (plugin) {
plugin.module.exports(kit.require('jQuery'));
}
},
jqueryMousewheel: {
path: __pmConfig__.assetsPath + '/jqueryMousewheel',
alias: 'jquery-mousewheel',
js: '/jquery.mousewheel.js',
deps: ['jQuery'],
onInstall: function (plugin) {
plugin.module.exports(kit.require('jQuery'));
}
},
});