Browse Source

Lowercasing classname to make npm/bower project name.

Herbert Vojčík 11 years ago
parent
commit
2f8385e964
1 changed files with 3 additions and 1 deletions
  1. 3 1
      template.js

+ 3 - 1
template.js

@@ -42,7 +42,7 @@ exports.template = function(grunt, init, done) {
     return string[0].toUpperCase() + string.slice(1).toLowerCase();
   }
 
-  init.prompts.name.message= 'Main class and package of Amber application.';
+  init.prompts.name.message= 'Main class and package of Amber application.\nProject name is derived by lowercasing this.';
   init.prompts.name.validator= function (line) { return /^[A-Z][A-Za-z0-9]*$/.test(line) };
   init.prompts.name.warning= 'Must be a valid class name: only alphanumeric and starting with an uppercase letter!';
   rememberViaValidator('name');
@@ -91,6 +91,8 @@ exports.template = function(grunt, init, done) {
     // Clean up non-npm props.
     delete props.namespace;
 
+    props.name = props.name.toLowerCase();
+
     // A few additional properties.
     props.keywords = ['Amber', 'Smalltalk'];
     props.devDependencies = {