Source: apc-abstract-heir/_apemanfile_helper.js

/**
 * @overview Helper module to create apemanfile configurations.
 * This file is generated by a task and do NOT edit manually.
 * @namespace _apemanfile_helper
 * @private
 * @author Taka Okunishi
 */


var h = exports;

/*
 * @function apemanfile.helper._workerPath
 * @protected
 * @ignore
 * @returns {string} - Worker path.
 */
h._workerPath = function(){
    var h = this;
    return h.resolve('task/worker/index.js');
};


/**
 * Task definition to change mode.
 * @function apemanfile.helper.changeModeTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.changeModeTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "changeMode"
        },
        config: config
    };
};

/**
 * Task definition to clean dead_symlinks.
 * @function apemanfile.helper.cleanDeadSymlinksTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.cleanDeadSymlinksTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "cleanDeadSymlinks"
        },
        config: config
    };
};

/**
 * Task definition to clean directory.
 * @function apemanfile.helper.cleanDirectoryTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.cleanDirectoryTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "cleanDirectory"
        },
        config: config
    };
};

/**
 * Task definition to exec command.
 * @function apemanfile.helper.execCommandTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.execCommandTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "execCommand"
        },
        config: config
    };
};

/**
 * Task definition to generate apiguide.
 * @function apemanfile.helper.generateApiguideTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generateApiguideTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generateApiguide"
        },
        config: config
    };
};

/**
 * Task definition to generate data_json.
 * @function apemanfile.helper.generateDataJsonTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generateDataJsonTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generateDataJson"
        },
        config: config
    };
};

/**
 * Task definition to generate index.
 * @function apemanfile.helper.generateIndexTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generateIndexTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generateIndex"
        },
        config: config
    };
};

/**
 * Task definition to generate index_test.
 * @function apemanfile.helper.generateIndexTestTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generateIndexTestTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generateIndexTest"
        },
        config: config
    };
};

/**
 * Task definition to generate instruments.
 * @function apemanfile.helper.generateInstrumentsTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generateInstrumentsTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generateInstruments"
        },
        config: config
    };
};

/**
 * Task definition to generate package_json.
 * @function apemanfile.helper.generatePackageJsonTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generatePackageJsonTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generatePackageJson"
        },
        config: config
    };
};

/**
 * Task definition to generate structure.
 * @function apemanfile.helper.generateStructureTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generateStructureTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generateStructure"
        },
        config: config
    };
};

/**
 * Task definition to generate test_files.
 * @function apemanfile.helper.generateTestFilesTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generateTestFilesTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generateTestFiles"
        },
        config: config
    };
};

/**
 * Task definition to generate unit_test_files.
 * @function apemanfile.helper.generateUnitTestFilesTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generateUnitTestFilesTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generateUnitTestFiles"
        },
        config: config
    };
};

/**
 * Task definition to install node_modules.
 * @function apemanfile.helper.installNodeModulesTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.installNodeModulesTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "installNodeModules"
        },
        config: config
    };
};

/**
 * Task definition to link npm_package.
 * @function apemanfile.helper.linkNpmPackageTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.linkNpmPackageTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "linkNpmPackage"
        },
        config: config
    };
};

/**
 * Task definition to pack npm_package.
 * @function apemanfile.helper.packNpmPackageTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.packNpmPackageTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "packNpmPackage"
        },
        config: config
    };
};

/**
 * Task definition to report to_coveralls.
 * @function apemanfile.helper.reportToCoverallsTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.reportToCoverallsTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "reportToCoveralls"
        },
        config: config
    };
};

/**
 * Task definition to run mocha.
 * @function apemanfile.helper.runMochaTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.runMochaTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "runMocha"
        },
        config: config
    };
};

/**
 * Task definition to run nodeunit.
 * @function apemanfile.helper.runNodeunitTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.runNodeunitTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "runNodeunit"
        },
        config: config
    };
};

/**
 * Task definition to generate apeman_helper_data.
 * @function apemanfile.helper.generateApemanHelperDataTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.generateApemanHelperDataTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "generateApemanHelperData"
        },
        config: config
    };
};

/**
 * Task definition to inherit templates.
 * @function apemanfile.helper.inheritTemplatesTask
 * @param {object} config - Task configuration.
 * @returns {object} - Task definition object.
 */
h.inheritTemplatesTask = function (config) {
    var h = this;
    return {
        worker: {
            path: h._workerPath(),
            key: "inheritTemplates"
        },
        config: config
    };
};


/**
 * New readonly file.
 * @param {string} src - Template file name.
 * @param {object} data - Render data.
 * @returns {object} - File definition object.
 * @protected
 * @ignore
 */
h._newReadonlyFile = function (src, data) {
    var h = this;
    return h.newFile().tmpl(h.resolve(src)).data(data);
};



/**
 * File definition with Apemanfile.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newApemanfileJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newApemanfileJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newApemanfileJsFile = function (data) {
    var h = this,
        src = 'tmpl/Apemanfile.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with LICENSE.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newLICENSEFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newLICENSEFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newLICENSEFile = function (data) {
    var h = this,
        src = 'tmpl/LICENSE.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with VERSION.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newVERSIONFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newVERSIONFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newVERSIONFile = function (data) {
    var h = this,
        src = 'tmpl/VERSION.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with bin/release_bin.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newReleaseBinFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newReleaseBinFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newReleaseBinFile = function (data) {
    var h = this,
        src = 'tmpl/bin/release_bin.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with bin/tag_bin.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newTagBinFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newTagBinFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newTagBinFile = function (data) {
    var h = this,
        src = 'tmpl/bin/tag_bin.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with bin/task_bin.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newTaskBinFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newTaskBinFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newTaskBinFile = function (data) {
    var h = this,
        src = 'tmpl/bin/task_bin.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with html/doc-index.html.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newDocIndexHtmlFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newDocIndexHtmlFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newDocIndexHtmlFile = function (data) {
    var h = this,
        src = 'tmpl/html/doc-index.html.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/_apemanfile_helper.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newApemanfileHelperJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newApemanfileHelperJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newApemanfileHelperJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/_apemanfile_helper.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/_prototype.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newPrototypeJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newPrototypeJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newPrototypeJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/_prototype.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/dependencies_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newDependenciesTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newDependenciesTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newDependenciesTestJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/dependencies_test.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/index.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newIndexJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newIndexJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newIndexJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/index.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/index_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newIndexTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newIndexTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newIndexTestJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/index_test.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/lib_index_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newLibIndexTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newLibIndexTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newLibIndexTestJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/lib_index_test.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/mock_injector.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockInjectorJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newMockInjectorJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newMockInjectorJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/mock_injector.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/test_resource.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newTestResourceJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newTestResourceJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newTestResourceJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/test_resource.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/unit_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newUnitTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newUnitTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newUnitTestJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/unit_test.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/worker_debug.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newWorkerDebugJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newWorkerDebugJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newWorkerDebugJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/worker_debug.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with js/worker_debug_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newWorkerDebugTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newWorkerDebugTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newWorkerDebugTestJsFile = function (data) {
    var h = this,
        src = 'tmpl/js/worker_debug_test.js.hbs';
    return h._newReadonlyFile(src, data);
};

/**
 * File definition with md/README.md.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newREADMEMdFile
 * @param {object} data - Render data object.
 * @example
 *    var File = h.newREADMEMdFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File definition object.
 */
h.newREADMEMdFile = function (data) {
    var h = this,
        src = 'tmpl/md/README.md.hbs';
    return h._newReadonlyFile(src, data);
};