All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.dirigible.template-form-builder-angularjs.template.template.js Maven / Gradle / Ivy

There is a newer version: 10.6.31
Show newest version
/*
 * Generated by Eclipse Dirigible based on model and template.
 *
 * Do not modify the content as it may be re-generated again.
 */
const generateUtils = dirigibleRequire("ide-generate-service/template/generateUtils");

exports.generate = function (model, parameters) {
    const templateModel = JSON.parse(model);
    const templateSources = exports.getTemplate(parameters).sources;
    if (templateModel.code) {
        templateModel.code = templateModel.code.split("\n").map(e => `    ${e}`).join('\n');
    }
    return generateUtils.generateGeneric(templateModel, parameters, templateSources);
};

exports.getTemplate = function (parameters) {
    return {
        name: "AngularJS Generator from Form Model",
        description: "AngularJS Form Model generator template",
        extension: "form",
        sources: [
            {
                location: "/template-form-builder-angularjs/ui/controller.js.template",
                action: "generate",
                rename: "gen/{{genFolderName}}/forms/{{fileName}}/controller.js",
                engine: "velocity",
            },
            {
                location: "/template-form-builder-angularjs/ui/index.html.template",
                action: "generate",
                rename: "gen/{{genFolderName}}/forms/{{fileName}}/index.html",
                engine: "velocity",
            },
            {
                location: "/template-form-builder-angularjs/ui/view.js.template",
                action: "generate",
                rename: "gen/{{genFolderName}}/forms/{{fileName}}/view.js",
                engine: "velocity",
            },
        ],
        parameters: []
    };
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy