lib/index.js
function generateUtilityFiles(next) {
    fs.copy(path.join(getConfig('template.folder'), 'index.js'), path.join(getConfig('output.folder'), 'index.js'), function (err) {
        if (err) { next(err); return; }
        if (getConfig('output.log')) { logger.info('(Created) Index file: ' + path.resolve(path.join(getConfig('output.folder'), 'index.js'))); }
        fs.copy(path.join(getConfig('template.folder'), '..', 'utils.js'), path.join(getConfig('output.folder'), 'utils.js'), function (err) {
            if (err) { next(err); return; }
            next(null);
        });
    });
    try {
        overriddenAliases = require(path.join(process.cwd(), getConfig('output.folder'), 'alias.json'));
    } catch (ignore) {}
}
function generateUtilityFiles(next) {
    fs.copy(path.join(getConfig('template.folder'), 'index.js'), path.join(getConfig('output.folder'), 'index.js'), function (err) {
        if (err) { next(err); return; }
        if (getConfig('output.log')) { logger.info('(Created) Index file: ' + path.resolve(path.join(getConfig('output.folder'), 'index.js'))); }
        fs.copy(path.join(getConfig('template.folder'), '..', 'utils.js'), path.join(getConfig('output.folder'), 'utils.js'), function (err) {
            if (err) { next(err); return; }
            next(null);
        });
    });
    try {
        overriddenAliases = require(path.join(process.cwd(), getConfig('output.folder'), 'alias.json'));
    } catch (ignore) {}
}
function generateUtilityFiles ( next ) { fs . copy ( path . join ( getConfig ( 'template.folder' ) , 'index.js' ) , path . join ( getConfig ( 'output.folder' ) , 'index.js' ) , function ( err ) { if ( err ) { next ( err ) ; return ; } if ( getConfig ( 'output.log' ) ) { logger . info ( '(Created) Index file: ' + path . resolve ( path . join ( getConfig ( 'output.folder' ) , 'index.js' ) ) ) ; } fs . copy ( path . join ( getConfig ( 'template.folder' ) , '..' , 'utils.js' ) , path . join ( getConfig ( 'output.folder' ) , 'utils.js' ) , function ( err ) { if ( err ) { next ( err ) ; return ; } next ( null ) ; } ) ; } ) ; try { overriddenAliases = require ( path . join ( process . cwd ( ) , getConfig ( 'output.folder' ) , 'alias.json' ) ) ; } catch ( ignore ) { } }
Generates index file by copying index.js from template directory to model directory. These locations come from
config.
@private
@param next
Generates index file by copying index . js from template directory to model directory . These locations come from config .