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


/**
 * Cut sym links before bundle.
 * @name ci.tasks.bundleCutLinks
 * @type {object}
 */
exports.bundleCutLinks = t.cutAndReplaceLinks({
    basedir: '.'
});

/**
 * Generate node package.json.
 * @name ci.tasks.bundleAsNodePackage
 * @type {object}
 */
exports.bundleAsNodePackage = t.generatePackageJson({
    dest: 'package.json'
});

exports.bundleBuild = [
    'clean',
    'structure',
    'index'
];

/**
 * Bundle the project.
 * @name ci.tasks.bundle
 * @type {object}
 */
exports.bundle = [
    'bundleBuild',
    'bundleCutLinks',
    'bundleAsNodePackage'
];