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


exports.commands = require('./commands');
exports._print = require('./_print');


/**
 * This is an alias for {@link apeman.commands.new }
 * @name apeman.new
 * @see {@link apeman.commands.new }
 */
exports.new = exports.commands.new;

/**
 * This is an alias for {@link apeman.commands.show }
 * @name apeman.show
 * @see {@link apeman.commands.show }
 */
exports.show = exports.commands.show;

/**
 * This is an alias for {@link apeman.commands.task }
 * @name apeman.task
 * @see {@link apeman.commands.task }
 */
exports.task = exports.commands.task;

/**
 * This is an alias for {@link apeman.commands.heir }
 * @name apeman.heir
 * @see {@link apeman.commands.heir }
 */
exports.heir = exports.commands.heir;



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, '../README.md'),
                wikiDir: path.resolve(__dirname, '../doc/wiki')
            }
        }
    },
    /**
     * Apeman project for current working directory.
     * @name apeman.currentProject
     */
    currentProject: {
        get: function(){
            var apeman = this;
            return apeman.loadProject(process.cwd());
        }
    }
});