Skip to content

Commit 13bce32

Browse files
committed
style(decorator): fix code format. add/remove spaces
1 parent 6a89f8e commit 13bce32

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

decorator/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Generator.prototype.askForOverwrite = function askForOverwrite() {
1414
var cb = this.async();
1515

1616
// TODO: Any yeoman.util function to handle this?
17-
var fileExists = fs.existsSync(this.env.cwd+'/app/scripts/'+buildRelativePath(this.fileName)+".js");
17+
var fileExists = fs.existsSync(this.env.cwd + '/app/scripts/' + buildRelativePath(this.fileName) + ".js");
1818
if (fileExists) {
1919
var prompts = [{
20-
name: 'overwriteDecorator',
21-
message: 'Would you like to overwrite existing decorator?',
22-
default: 'Y/n',
23-
warning: 'Yes: Decorator will be replaced.'
24-
}];
20+
name : 'overwriteDecorator',
21+
message: 'Would you like to overwrite existing decorator?',
22+
default: 'Y/n',
23+
warning: 'Yes: Decorator will be replaced.'
24+
}];
2525

2626
this.prompt(prompts, function (err, props) {
2727
if (err) {
@@ -42,14 +42,14 @@ Generator.prototype.askForOverwrite = function askForOverwrite() {
4242
Generator.prototype.askForNewName = function askForNewName() {
4343
var cb = this.async();
4444

45-
if(this.overwriteDecorator === undefined || this.overwriteDecorator === true){
45+
if (this.overwriteDecorator === undefined || this.overwriteDecorator === true) {
4646
cb();
4747
return;
4848
}
49-
else{
49+
else {
5050
var prompts = new Array();
5151
prompts.push({
52-
name: 'decortatorName',
52+
name : 'decortatorName',
5353
message: 'Alternative name for the decorator:'
5454
});
5555

@@ -65,10 +65,10 @@ Generator.prototype.askForNewName = function askForNewName() {
6565
};
6666

6767
Generator.prototype.createDecoratorFiles = function createDecoratorFiles() {
68-
this.appTemplate('decorator', 'scripts/'+buildRelativePath(this.fileName));
68+
this.appTemplate('decorator', 'scripts/' + buildRelativePath(this.fileName));
6969
this.addScriptToIndex(buildRelativePath(this.fileName));
7070
};
7171

7272
function buildRelativePath(fileName){
73-
return 'decorators/' + fileName+"Decorator";
73+
return 'decorators/' + fileName + "Decorator";
7474
}

templates/javascript-min/decorator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
angular.module('<%= _.camelize(appname) %>App')
4-
.config( ['$provide', function ($provide) {
4+
.config(['$provide', function ($provide) {
55
$provide.decorator('<%= _.camelize(name) %>', function ($delegate) {
66
// decorate the $delegate
77
return $delegate;

0 commit comments

Comments
 (0)