Skip to content

Commit

Permalink
Cleanup in CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Jan 19, 2014
1 parent cedae83 commit 56c511a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions bin/sails-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var Sails = require('../lib/app')
, captains = require('captains-log')
, REPL = require('repl');

require('colors');


/**
Expand All @@ -26,7 +27,7 @@ module.exports = function () {
var log = captains(rconf.log);

console.log();
log.info('Lifting Sails in interactive mode...'.debug);
log.info('Starting app in interactive mode...'.debug);
console.log();

// Now load up sails for real
Expand All @@ -49,7 +50,6 @@ module.exports = function () {
log.info('Welcome to the Sails console.');
log.info(('( to exit, type '+'<CTRL>+<C>'+' )').grey);
console.log();
require('colors');

var repl = REPL.start('sails> ');
repl.on('exit', function(err) {
Expand Down
2 changes: 1 addition & 1 deletion bin/sails-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ node --debug `which sails` $@

module.exports = function () {
var config = {};
var log = captains(config.log);
var log = captains();
};
21 changes: 11 additions & 10 deletions bin/sails-lift.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ var package = require('../package.json')
, reportback = require('reportback')()
, _ = require('lodash')
, rconf = require('../lib/configuration/rc')
, captains = require('captains-log')
, path = require('path');

require('colors');


/**
Expand All @@ -23,18 +25,17 @@ var package = require('../package.json')

module.exports = function () {

// Build initial scope
var scope = {
rootPath: process.cwd(),
sailsPackageJSON: package
};
var log = captains(rconf.log);

// Mix-in rc config
_.merge(scope, rconf.generators);
console.log();
log.info('Starting app...'.debug);
console.log();

// TODO: just do a top-level merge and reference
// `scope.generators.modules` as needed (simpler)
_.merge(scope, rconf);
// Build initial scope, mixing-in rc config
var scope = _.merge({
rootPath: process.cwd(),
sailsPackageJSON: package
}, rconf);

// Use the app's local Sails in `node_modules` if one exists
var appPath = process.cwd();
Expand Down
1 change: 0 additions & 1 deletion bin/sails-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

var package = require('../package.json')
, reportback = require('reportback')()
, rconf = require('../lib/configuration/rc')
, _ = require('lodash')
, path = require('path')
Expand Down

0 comments on commit 56c511a

Please sign in to comment.