/**
 * Define structure tasks.
 * @module ci.tasks.structureTasks
 * @author "ci.worker.generateStructure"
 *
 */
var helpers = require('../helpers'),
    apeman = require('apeman'),
    t = helpers.taskDefineHelper;

exports.structureProject = t.generateStructure({
    data: apeman.currentProject.lookupRequire('ci/config/structure-config')
});

/**
 * Generate ci file config helper file.
 * @name ci.tasks.structureCiFileConfigHelper
 * @type {object}
 */
exports.structureCiFileConfigHelper = t.generateFileConfigHelper({
    tmplDir: 'tmpl',
    dest: 'ci/helpers/file_config_helper.js',
    testDest: 'test/unit_tests/ci/helpers/file_config_helper_test.js'
});

/**
 * Generate ci task define helper file.
 * @name ci.tasks.structureCiTaskDefineHelper
 * @type {*|Object}
 */
exports.structureCiTaskDefineHelper = t.generateTaskDefineHelper({
    workerDir: 'ci/worker',
    dest: 'ci/helpers/task_define_helper.js',
    testDest: 'test/unit_tests/ci/helpers/task_define_helper_test.js'
});


/**
 * Generate structures
 * @name ci.tasks.structure
 * @type {object}
 */
exports.structure = [
    'structureProject',
    'structureCiFileConfigHelper',
    'structureCiTaskDefineHelper'
];