0.0.1 • Published 11 years ago

grunt-contrib-t34 v0.0.1

Weekly downloads
1
License
-
Repository
github
Last release
11 years ago

T34

code generation for javascript

Getting Started

This plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-contrib-t34

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-contrib-t34');

The "T34" task

Overview

In your project's Gruntfile, add a section named T34 to the data object passed into grunt.initConfig().

grunt.initConfig({
        T34: {
            default_options: {
                from: "T34CodeGeneration/createNewModuleElement/-#name#-.t34",
                where: "app/elements",
                obj: {
                    "name": "t34Module",
                    "cName": 'T34Module'
                }
            }
        }
})

Example

    grunt.registerTask('newModule', 'create module elements', function (nameModule) {
        var objMy = {
            "name": nameModule,
            "cName": nameModule.charAt(0).toUpperCase() + nameModule.slice(1)
        };
        grunt.initConfig({
            T34: {
                app_elements: {
                    from: "T34CodeGeneration/createNewModuleElement/-#name#-.t34",
                    where: "app/elements",
                    obj: objMy
                },
                designer_Views: {
                    from: "T34CodeGeneration/createNewModuleElement/-#cName#-.t34",
                    where: "designer/app/view/regionCenter/Views/ControlsMetadata/Controls",
                    obj: objMy
                },
                designer_Controls: {
                    from: "T34CodeGeneration/createNewModuleElement/-#cName#-.js.t34",
                    where: "designer/app/controller/Controls",
                    obj: objMy
                }
            }
        });
        grunt.task.run('T34');
    });

Options

Custom Options

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)