Permalink
Browse files

[api, fix] Fix "analyze" and "noanalyze" option parsing, remove old "…

…resolveDependencies" option.
  • Loading branch information...
1 parent 99e95f6 commit e09d16c33a4ab1b92b31535dd0f4d2889eeeab81 @AvianFlu AvianFlu committed Nov 10, 2011
Showing with 9 additions and 10 deletions.
  1. +9 −10 lib/jitsu/package.js
View
19 lib/jitsu/package.js
@@ -455,16 +455,15 @@ function tryAnalyze (target, dir, callback) {
return callback(false, target);
}
- var resolve = jitsu.config.get('resolveDependencies'),
- noanalyze = !(jitsu.config.get('analyze'))
- || (jitsu.config.get('noanalyze') === 'true')
- || !(target.analyze)
- || optimist.argv.noanalyze,
- analyze = typeof resolve === 'undefined'
- ? !noanalyze
- : !resolve;
-
- if (!analyze) {
+ var noanalyze = !((jitsu.config.get('analyze') === 'true')
+ || (jitsu.config.get('analyze') === true))
+ || ((jitsu.config.get('noanalyze') === 'true')
+ || (jitsu.config.get('noanalyze') === true))
+ || ((target.analyze === 'false')
+ || (target.analyze === false))
+ || optimist.argv.noanalyze
+
+ if (noanalyze) {
winston.info('skipping require-analyzer because ' + 'noanalyze'.magenta + ' option is set');
return callback(null, target);
}

0 comments on commit e09d16c

Please sign in to comment.