Permalink
Browse files

Merge branch 'switachable-template-support' of https://github.com/mde…

…/geddy into switachable-template-support
  • Loading branch information...
2 parents 7c3cc75 + cd1479d commit c39e7daec88757d5b90cb6dc433a23d7115e37cb @MiguelMadero MiguelMadero committed Mar 13, 2013
Showing with 14 additions and 9 deletions.
  1. +8 −4 bin/cli.js
  2. +2 −1 package.json
  3. +4 −4 templates/Jakefile
View
@@ -5,7 +5,8 @@ var geddy = require('../lib/geddy')
, path = require('path')
, utils = require('utilities')
, parseopts = require('../lib/parseopts')
- , getTemplatesPath = require('../templates/templates_path').getTemplatesPath;
+ , getTemplatesPath = require('../templates/templates_path').getTemplatesPath
+ , debug = require('debug')('jake');
// Variables
var cwd = process.cwd()
@@ -264,7 +265,7 @@ if (cmds.length) {
break;
case 'app':
// Generating application
- cmd += 'gen:app[' + cmds[1] + engineCmd + rtCmd + templatesPathCmd + ']';
+ cmd += 'gen:app[' + cmds[1] + templatesPathCmd + engineCmd + rtCmd + ']';
break;
case 'resource':
// Generating resource
@@ -276,11 +277,11 @@ if (cmds.length) {
break;
case 'controller':
// Generating controller
- cmd += 'gen:bareController[' + cmds[1] + engineCmd + templatesPathCmd + ']';
+ cmd += 'gen:bareController[' + cmds[1] + templatesPathCmd + engineCmd + ']';
break;
case 'model':
// Generating model
- cmd += 'gen:model[' + cmds[1] + modelCmd + "," + templatesPathCmd + ']';
+ cmd += 'gen:model[' + cmds[1] + templatesPathCmd + "," + modelCmd + ']';
break;
case 'secret':
// Generating new app secret
@@ -297,6 +298,9 @@ if (cmds.length) {
jake = require('jake');
jakeProgram = jake.program;
jakeLoader = jake.loader;
+
+ debug(cmd);
+
// Load Geddy's bundled Jakefile
jakeLoader.loadFile(filepath);
if (cmd == 'jake') {
View
@@ -15,7 +15,8 @@
"utilities": "0.0.x",
"model": "0.0.x",
"barista": "0.0.x",
- "socket.io": "0.9.x"
+ "socket.io": "0.9.x",
+ "debug": "0.7.x"
},
"bin": {
"geddy": "./bin/cli.js"
View
@@ -398,7 +398,7 @@ namespace('gen', function () {
};
// Creates a new Geddy app scaffold
- task('app', function (name, engine, realtime, templatesPath) {
+ task('app', function (name, templatesPath, engine, realtime) {
var mkdirs
, cps
@@ -526,7 +526,7 @@ namespace('gen', function () {
}, {async: true});
- task('model', function (name, properties, modelPath, templatesPath) {
+ task('model', function (name, templatesPath, properties, modelPath) {
var createTableTask;
if (!name) {
throw new Error('No model name specified.');
@@ -552,7 +552,7 @@ namespace('gen', function () {
}, {async: true});
- task('controller', function (name) {
+ task('controller', function (name, templatesPath) {
if (!name) {
throw new Error('No controller name specified.');
}
@@ -584,7 +584,7 @@ namespace('gen', function () {
});
});
- task('bareController', function (name, engine) {
+ task('bareController', function (name, templatesPath, engine) {
if (!name) {
throw new Error('No controller name specified.');
}

0 comments on commit c39e7da

Please sign in to comment.