lib/middleware/jng.utils.js
function registerJytPlugins() {
    var rootDir = this.pancakes.getRootDir();
    var pluginDir = path.normalize(rootDir + '/app/common/jyt.plugins');
    var me = this;

    // if plugin dir doesn't exist, just return
    if (!fs.existsSync(pluginDir)) { return;  }

    // else get all plugin files from the jyt.plugins dir
    var pluginFiles = fs.readdirSync(pluginDir);
    var deps = { dependencies: me.getJangularDeps() };
    _.each(pluginFiles, function (pluginFile) {
        var name = me.dotToCamelCase(pluginFile);
        var pluginFlapjack = me.pancakes.requireModule(pluginDir + delim + pluginFile);
        var plugin = me.pancakes.cook(pluginFlapjack, deps);
        jangular.registerPlugin(name, plugin);
        me.jangularDeps[name] = plugin;
    });
}
function registerJytPlugins() {
    var rootDir = this.pancakes.getRootDir();
    var pluginDir = path.normalize(rootDir + '/app/common/jyt.plugins');
    var me = this;

    // if plugin dir doesn't exist, just return
    if (!fs.existsSync(pluginDir)) { return;  }

    // else get all plugin files from the jyt.plugins dir
    var pluginFiles = fs.readdirSync(pluginDir);
    var deps = { dependencies: me.getJangularDeps() };
    _.each(pluginFiles, function (pluginFile) {
        var name = me.dotToCamelCase(pluginFile);
        var pluginFlapjack = me.pancakes.requireModule(pluginDir + delim + pluginFile);
        var plugin = me.pancakes.cook(pluginFlapjack, deps);
        jangular.registerPlugin(name, plugin);
        me.jangularDeps[name] = plugin;
    });
}
function registerJytPlugins ( ) { var rootDir = this . pancakes . getRootDir ( ) ; var pluginDir = path . normalize ( rootDir + '/app/common/jyt.plugins' ) ; var me = this ; // if plugin dir doesn't exist, just return if ( ! fs . existsSync ( pluginDir ) ) { return ; } // else get all plugin files from the jyt.plugins dir var pluginFiles = fs . readdirSync ( pluginDir ) ; var deps = { dependencies : me . getJangularDeps ( ) } ; _ . each ( pluginFiles , function ( pluginFile ) { var name = me . dotToCamelCase ( pluginFile ) ; var pluginFlapjack = me . pancakes . requireModule ( pluginDir + delim + pluginFile ) ; var plugin = me . pancakes . cook ( pluginFlapjack , deps ) ; jangular . registerPlugin ( name , plugin ) ; me . jangularDeps [ name ] = plugin ; } ) ; }
Register plugins from the jyt.plugins dir
Register plugins from the jyt . plugins dir