Skip to content
Browse files

Merge pull request #199 from MiguelMadero/master

Closes #196 and #197.

Fixes for issues #196 and #197
  • Loading branch information...
2 parents 6cf8de6 + dc7c89f commit 8484f107f7885fabaae8323d81f3a46d56d6114d @larzconwell larzconwell committed Sep 25, 2012
Showing with 11 additions and 2 deletions.
  1. +4 −1 bin/cli.js
  2. +7 −1 templates/Jakefile
View
5 bin/cli.js
@@ -179,7 +179,10 @@ if(cmds.length) {
die(cmds[0] + ' is not a Geddy command.');
}
- //cmd += ' --quiet';
+ if (!opts.debug) {
+ cmd += ' --quiet';
+ }
+
exec(cmd, function(err, stdout, stderr) {
if(err) {
throw err;
View
8 templates/Jakefile
@@ -106,14 +106,20 @@ namespace('gen', function () {
, text = fs.readFileSync(path.join(__dirname, filename + '.ejs'), 'utf8').toString()
, bare = options.bare || false // Default to full controller
, templ
+ , fileDir
, filePath;
// Render with the right model name
templ = new adapter({data: {ext: '.ejs'}, text: text, templato: templato});
templ.process({names: names, bare: bare, properties: options.properties});
// Write file
- filePath = path.join('app', dirname, names.filename[options.inflection] + '.js');
+ fileDir = path.join('app', dirname);
+ if (!utils.file.existsSync(fileDir)) {
+ fs.mkdirSync(fileDir);
+ }
+
+ filePath = path.join(fileDir, names.filename[options.inflection] + '.js');
fs.writeFileSync(filePath, templ.markup, 'utf8');
console.log('[Added] ' + filePath);

1 comment on commit 8484f10

@larzconwell

It wasn't a fix for #196 but rather #198.

Please sign in to comment.
Something went wrong with that request. Please try again.