src/PluginEngine.js
function(name, pa){
        var pa = pa || name;

        if (!this.isExist(name)){
            var realPath = path.join(_pluginBase, pa, 'main.js');
            var pluginReg;
            if (!fs.existsSync(realPath)) {
                pluginReg = require(pa);
            } else {
                pluginReg = require(fs.realpathSync(realPath));
            }

            _pluginList.push(new Plugin(name, pa, pluginReg));
            
            pluginReg(PluginAPI);
        }
    }
function(name, pa){
        var pa = pa || name;

        if (!this.isExist(name)){
            var realPath = path.join(_pluginBase, pa, 'main.js');
            var pluginReg;
            if (!fs.existsSync(realPath)) {
                pluginReg = require(pa);
            } else {
                pluginReg = require(fs.realpathSync(realPath));
            }

            _pluginList.push(new Plugin(name, pa, pluginReg));
            
            pluginReg(PluginAPI);
        }
    }
function ( name , pa ) { var pa = pa || name ; if ( ! this . isExist ( name ) ) { var realPath = path . join ( _pluginBase , pa , 'main.js' ) ; var pluginReg ; if ( ! fs . existsSync ( realPath ) ) { pluginReg = require ( pa ) ; } else { pluginReg = require ( fs . realpathSync ( realPath ) ) ; } _pluginList . push ( new Plugin ( name , pa , pluginReg ) ) ; pluginReg ( PluginAPI ) ; } }
register the plugin
@param  {String} path the plugin's path
@return {void}
register the plugin