Skip to content

Commit

Permalink
fix(app): Merge PR
Browse files Browse the repository at this point in the history
  • Loading branch information
hassony2 committed Mar 21, 2016
2 parents 8829f14 + e83e4ef commit 635bb1d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions class/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var ComponentGenerator = Class.extend({
message: 'What is the name of your module ?',
default: that.modulename || (choices && choices.length >= 1 ? choices[0].value : that.modulename),
validate: function(value) {
value = _.str.trim(value);
value = _.trim(value);
if (_.isEmpty(value) || value[0] === '/' || value[0] === '\\') {
return 'Please enter a non empty name';
}
Expand All @@ -102,7 +102,7 @@ var ComponentGenerator = Class.extend({
message: 'How would like to name your ' + _templateFolder + ' ?',
validate: function(value) {

value = _.str.trim(value);
value = _.trim(value);
if (_.isEmpty(value) || value[0] === '/' || value[0] === '\\') {
that.prompt_errors = 'Please enter a non empty name';
return 'Please enter a non empty name';
Expand Down Expand Up @@ -146,4 +146,4 @@ module.exports = function(localFolder, templateFolder) {
_localFolder = localFolder;
_templateFolder = templateFolder;
return ComponentGenerator;
};
};
4 changes: 2 additions & 2 deletions module/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var ModuleGenerator = Class.extend({
message: 'What is the name of your module ?',
default: this.modulename,
validate: function(value) {
value = _.str.trim(value);
value = _.trim(value);
if (_.isEmpty(value) || value[0] === '/' || value[0] === '\\') {
return 'Please enter a non empty name';
}
Expand Down Expand Up @@ -125,4 +125,4 @@ var ModuleGenerator = Class.extend({
}
});

module.exports = ModuleGenerator;
module.exports = ModuleGenerator;
6 changes: 3 additions & 3 deletions service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ var ServiceGenerator = Class.extend({
message: 'What is the name of your module ?',
default: that.modulename || (choices && choices.length >= 1 ? choices[0].value : that.modulename),
validate: function(value) {
value = _.str.trim(value);
value = _.trim(value);
if (_.isEmpty(value) || value[0] === '/' || value[0] === '\\') {
return 'Please enter a non empty name';
}
Expand All @@ -117,7 +117,7 @@ var ServiceGenerator = Class.extend({
},
message: 'How would like to name your service ?',
validate: function(value) {
value = _.str.trim(value);
value = _.trim(value);
if (_.isEmpty(value) || value[0] === '/' || value[0] === '\\') {
return 'Please enter a non empty name';
}
Expand Down Expand Up @@ -165,4 +165,4 @@ var ServiceGenerator = Class.extend({
}
});

module.exports = ServiceGenerator;
module.exports = ServiceGenerator;
2 changes: 1 addition & 1 deletion target/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var TargetGenerator = Class.extend({
message: 'What is the name of your target application?',
default: this.targetname,
validate: function(value) {
value = _.str.trim(value);
value = _.trim(value);
if (_.isEmpty(value) || value[0] === '/' || value[0] === '\\') {
return 'Please enter a non empty name';
}
Expand Down

0 comments on commit 635bb1d

Please sign in to comment.