(name)
| 21 | // TODO - investigate whether this would be better |
| 22 | // using the async version of fs.mkdir - PJENSEN |
| 23 | makeRootDirectory = function (name) { |
| 24 | try { |
| 25 | fs.mkdirSync(name, dir_mode); // Create the root directory |
| 26 | return true; |
| 27 | } catch (e) { |
| 28 | if (e.code === 'EEXIST') { |
| 29 | log('Sorry the \'' + name + '\' directory already exists. Please choose another name for your app.'); |
| 30 | return false; |
| 31 | } else { |
| 32 | throw e; |
| 33 | } |
| 34 | } |
| 35 | }; |
| 36 | |
| 37 | exports.generate = function(program) { |
| 38 |