Skip to content

Commit

Permalink
Quick commands naming convention and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
logeshpaul committed Apr 2, 2015
1 parent 2ae3c2a commit 615b117
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 42 deletions.
16 changes: 7 additions & 9 deletions app/templates/js/_angular_application.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
/*================================================================
App <%= site_name %>
App <%= site_name %>
==================================================================*/
/*global angular*/

'use strict';

var app = angular.module('<%= site_name %>', ['ngRoute']);

app.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('', {
controller: '',
templateUrl: ''
})
$routeProvider
.when('', {
controller: '',
templateUrl: ''
})

.otherwise({ redirectTo: '/' });
.otherwise({ redirectTo: '/' });
}]);

14 changes: 6 additions & 8 deletions controller/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict';
var util = require('util'),
chalk = require('chalk');
chalk = require('chalk');

var ScriptBase = require('../script-base.js');


var Generator = module.exports = function Generator() {
var smacssGenerator = module.exports = function smacssGenerator() {
ScriptBase.apply(this, arguments);

// if the controller name is suffixed with ctrl, remove the suffix
Expand All @@ -15,12 +14,11 @@ var Generator = module.exports = function Generator() {
}
};

util.inherits(Generator, ScriptBase);
util.inherits(smacssGenerator, ScriptBase);

//Function to create controller
Generator.prototype.createControllerFiles = function createControllerFiles() {

this.log(chalk.yellow('Creating controller, please wait...... \n'));
// Function to create controller
smacssGenerator.prototype.createControllerFiles = function createControllerFiles() {
this.log(chalk.yellow('Creating controller, please wait...... \n\n'));

this.generateSourceAndTest(
'_controller', // controller template name
Expand Down
25 changes: 12 additions & 13 deletions directive/index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
'use strict';
var util = require('util'),
chalk = require('chalk');
chalk = require('chalk');

var ScriptBase = require('../script-base.js');

var Generator = module.exports = function Generator() {
ScriptBase.apply(this, arguments);
var smacssGenerator = module.exports = function smacssGenerator() {
ScriptBase.apply(this, arguments);
};

util.inherits(Generator, ScriptBase);

Generator.prototype.createDirectiveFiles = function createDirectiveFiles() {
util.inherits(smacssGenerator, ScriptBase);

smacssGenerator.prototype.createDirectiveFiles = function createDirectiveFiles() {
this.log(chalk.yellow('Creating directive, please wait...... \n'));

this.generateSourceAndTest(
'_directive',
'spec/directive',
'directives',
this.options['add-index'] || false
);
this.generateSourceAndTest(
'_directive',
'spec/directive',
'directives',
this.options['add-index'] || false
);
};
12 changes: 6 additions & 6 deletions filter/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
'use strict';
var util = require('util'),
chalk = require('chalk');
chalk = require('chalk');

var ScriptBase = require('../script-base.js');

var Generator = module.exports = function Generator() {
var smacssGenerator = module.exports = function smacssGenerator() {
ScriptBase.apply(this, arguments);
};

util.inherits(Generator, ScriptBase);
util.inherits(smacssGenerator, ScriptBase);

Generator.prototype.createFilterFiles = function createFilterFiles() {
smacssGenerator.prototype.createFilterFiles = function createFilterFiles() {

this.log(chalk.yellow('Creating filter, please wait...... \n'));
this.log(chalk.yellow('Creating filter, please wait...... \n'));

this.generateSourceAndTest(
'_filter',
Expand Down
10 changes: 4 additions & 6 deletions service/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
'use strict';
var util = require('util'),
chalk = require('chalk');
chalk = require('chalk');

var ScriptBase = require('../script-base.js');


var Generator = module.exports = function Generator() {
var smacssGenerator = module.exports = function smacssGenerator() {
ScriptBase.apply(this, arguments);
};

util.inherits(Generator, ScriptBase);
util.inherits(smacssGenerator, ScriptBase);

Generator.prototype.createServiceFiles = function createServiceFiles() {

smacssGenerator.prototype.createServiceFiles = function createServiceFiles() {
this.log(chalk.yellow('Creating service, please wait...... \n'));

this.generateSourceAndTest(
Expand Down

0 comments on commit 615b117

Please sign in to comment.