/**
 * Global object includes all apeman library
 * @namespace apeman
 * @author Taka Okunishi
 *
 */

{{#each names}}
exports.{{@key}} = require('{{this}}');{{/each}}

{{#each commandNames}}
/**
 * This is an alias for {@link apeman.commands.{{this}} }
 * @name apeman.{{this}}
 * @see {@link apeman.commands.{{this}} }
 */
exports.{{this}} = exports.commands.{{this}};
{{/each}}


exports.loadProject = require('./load_project');
exports.coreAppsData = require('../core_apps/core-apps-data.json');

Object.defineProperties(exports, {
    /**
     * Apeman version.
     * @name apeman.version
     */
    version: {
        get: function () {
            var apeman  = this;
            return apeman.pkg.version;
        }
    },
    /**
     * Apeman package data.
     * @name apeman.pkg
     * @ignore
     */
    pkg: {
        get: function() {
            return require('../package.json');
        }
    },
    /**
     * Apeman document path.
     * @name apeman.docPath
     * @ignore
     */
    docPath: {
        get: function(){
            var path = require('path');
            return {
                readme: path.resolve(__dirname, '../{{readmePath}}'),
                wikiDir: path.resolve(__dirname, '../{{wikiDirPath}}')
            }
        }
    },
    /**
     * Apeman project for current working directory.
     * @name apeman.currentProject
     */
    currentProject: {
        get: function(){
            var apeman = this;
            return apeman.loadProject(process.cwd());
        }
    }
});
