Browse files

lint fixes

  • Loading branch information...
1 parent 47d4deb commit 849162ab47b513f9e60e67112955fa85249aebaa @davglass davglass committed Sep 27, 2012
Showing with 14 additions and 11 deletions.
  1. +6 −6 lib/pack.js
  2. +0 −1 lib/tasks.js
  3. +0 −1 lib/tasks/compressor.js
  4. +8 −1 lib/walk.js
  5. +0 −2 lib/watch.js
View
12 lib/pack.js
@@ -1,4 +1,3 @@
-/*jslint stupid: true */
/*
Copyright (c) 2012, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
@@ -17,8 +16,8 @@ exports.valid = function (json) {
};
var flatten = function (json) {
- var i,
- walker = function (l) {
+ var walker = function (i) {
+ return function (l) {
var m, o;
if (json[i][l]) {
m = flatten(json[i][l]);
@@ -30,9 +29,10 @@ var flatten = function (json) {
}
}
};
- for (i in json) {
- if (json.hasOwnProperty(i)) {
- ['submodules', 'plugins'].forEach(walker);
+ }, item;
+ for (item in json) {
+ if (json.hasOwnProperty(item)) {
+ ['submodules', 'plugins'].forEach(walker(item));
delete json.condition;
}
}
View
1 lib/tasks.js
@@ -9,7 +9,6 @@ var fs = require('fs'),
var files = fs.readdirSync(path.join(__dirname, './tasks/'));
-var tasks = [];
files.forEach(function (file) {
if (path.extname(file) === '.js') {
var mod = require('./tasks/' + file), name;
View
1 lib/tasks/compressor.js
@@ -4,7 +4,6 @@ Code licensed under the BSD License:
http://yuilibrary.com/license/
*/
var compressor = require('yuicompressor'),
- path = require('path'),
compressing = false,
queue = [],
running = 0,
View
9 lib/walk.js
@@ -21,7 +21,14 @@ exports.run = function (options) {
start = new Date(),
mods = [],
max = options.max || false,
- bar = new ProgressBar(log.color(' shifting [', 'magenta') + log.color(':bar', 'cyan') + log.color(']', 'magenta') + log.color(' :percent :etas', 'yellow'), { total: 100, width: 100, complete: '>', incomplete: ' ' }),
+ bar = new ProgressBar(log.color(' shifting [', 'magenta') +
+ log.color(':bar', 'cyan') + log.color(']', 'magenta') +
+ log.color(' :percent :etas', 'yellow'), {
+ total: 100,
+ width: 100,
+ complete: '>',
+ incomplete: ' '
+ }),
i,
args = [];
View
2 lib/watch.js
@@ -1,7 +1,6 @@
var log = require('./log'),
watch = require('watch'),
path = require('path'),
- fs = require('fs'),
which = require('which').sync,
timer = require('./timer'),
dirs = [
@@ -11,7 +10,6 @@ var log = require('./log'),
'meta'
],
spawn = require('child_process').spawn,
- exists = fs.exists || path.exists,
quiet = false,
buildRunning = false,
buildArgs = [],

0 comments on commit 849162a

Please sign in to comment.