2 * @class Ext.generator.Controller
3 * @extends Ext.generator.Base
4 * Generates a Controller file based on a template
6 Ext.generator.Controller = Ext.extend(Ext.generator.Base, {
9 var controllerFile = 'app/controllers/' + this.name + '.js';
11 this.headline("Generating the " + this.name + " controller");
13 this.template('Controller', this, controllerFile);
14 this.template('ControllerSpec', this, 'test/unit/controllers/' + this.name + '.js');
16 this.insertInclude(controllerFile, 'sencha-controllers');
17 this.insertInclude('../../' + controllerFile, 'app-controllers', 'test/unit/index.html');
18 this.insertInclude('controllers/' + this.name + '.js', 'spec-controllers', 'test/unit/index.html');
21 decodeArgs: function(args) {
23 this.actions = args.slice(1);
27 Ext.regGenerator('controller', Ext.generator.Controller);
29 load('src/generators/controller/templates/ControllerSpec.js');
30 load('src/generators/controller/templates/Controller.js');