Fixed sublime-linter with predefs, added dpd cli to make

This commit is contained in:
DallonF
2012-09-12 11:32:15 -07:00
parent dacf05fce6
commit 6c1f0fbf34
4 changed files with 12 additions and 27 deletions

View File

@@ -4,22 +4,5 @@
"proto": true,
"lastsemic": true,
"laxbreak": true,
"strict": false,
"undef": true,
"browser": true,
"globals": {
"describe": true
, "it": true
, "afterEach": true
, "beforeEach": true
, "expect": true
, "dpd": true
, "chain": true
, "cleanCollection": true
}
"strict": false
}

12
bin/dpd
View File

@@ -14,7 +14,7 @@ var program = require('commander')
, tty = require('tty')
, remote = require('../lib/client/remote')
, request = require('request')
, package = require('../package')
, packageInfo = require('../package')
, latestversionFile = path.join(__dirname, '../.latestversion')
, Deployment = require('../lib/client/deploy').Deployment
, open = require('../lib/util/open');
@@ -30,7 +30,7 @@ program
.option('-w, --wait', 'wait for input before exiting')
.option('-d, --dashboard', 'start the dashboard immediately')
.option('-o, --open', 'open in a browser')
.option('-e, --environment [env]', 'defaults to development')
.option('-e, --environment [env]', 'defaults to development');
/**
* Commands
@@ -70,11 +70,11 @@ function start(file) {
process.chdir(path.dirname(file));
}
if (test('-f', 'app.dpd')) {
console.log("starting deployd v" + package.version + "...");
console.log("starting deployd v" + packageInfo.version + "...");
if (fs.existsSync(latestversionFile)) {
var latest = fs.readFileSync(latestversionFile, 'utf-8');
if (latest && latest !== package.version) {
if (latest && latest !== packageInfo.version) {
console.log("deployd v" + latest + " is available. Use dpd-update command to install");
}
}
@@ -89,7 +89,7 @@ function start(file) {
console.log("Failed to start MongoDB");
return stop(1);
}
var options = {port: port, env: 'development', db: {host: '127.0.0.1', port: mongoPort, name: '-deployd'}}
var options = {port: port, env: 'development', db: {host: '127.0.0.1', port: mongoPort, name: '-deployd'}};
options.env = program.environment || process.env.DPD_ENV || options.env;
if(options.env !== 'development') console.log('starting in %s mode', options.env);
@@ -174,7 +174,7 @@ program
, Keys = require('../lib/keys')
, keys = new Keys();
if (process.env["DPDAPP_PORT"]) DPDAPP_URL += ':' + process.env["DPDAPP_PORT"];
if (process.env.DPDAPP_PORT) DPDAPP_URL += ':' + process.env.DPDAPP_PORT;
keys.getLocal(function (err, key) {
if(err) return console.error(err);

View File

@@ -17,7 +17,7 @@ function hint(pathName, fileName) {
var lastPath = process.cwd();
cd(pathName);
echo("Linting " + pathName + (fileName ? ("/" + fileName) : "") + "...");
exec('jshint ' + (fileName || '.'));
exec('jshint ' + (fileName || '.') + " --extra-ext " + fileName);
echo();
cd(lastPath);
}
@@ -36,5 +36,7 @@ target.jshintDpdJs = function() {
};
target.jshintCli = function() {
hint('bin', 'dpd');
cp('bin/dpd', 'bin/dpd.js');
hint('bin', 'dpd.js');
rm('bin/dpd.js');
};

View File

@@ -8,7 +8,7 @@
"undef": true,
"browser": true,
"globals": {
"predef": {
"describe": true
, "it": true