Permalink
Browse files

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

  • Loading branch information...
dallonf committed Sep 12, 2012
1 parent dacf05f commit 6c1f0fbf34210fe4e9c9ca356d4ff55c2831b7e4
Showing with 12 additions and 27 deletions.
  1. +1 −18 bin/.jshintrc
  2. +6 −6 bin/dpd
  3. +4 −2 make.js
  4. +1 −1 test-app/.jshintrc
View
@@ -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
}
View
12 bin/dpd
@@ -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
@@ -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
@@ -8,7 +8,7 @@
"undef": true,
"browser": true,
- "globals": {
+ "predef": {
"describe": true
, "it": true

0 comments on commit 6c1f0fb

Please sign in to comment.