Permalink
Browse files

Code style fixes.

  • Loading branch information...
1 parent 9fb2657 commit 4325c870dd1d5d71084362a11d1adb3b65e1b248 @JohnAlbin JohnAlbin committed Jul 19, 2014
Showing with 24 additions and 16 deletions.
  1. +24 −16 bin/kss-node
View
@@ -146,10 +146,13 @@ process.nextTick(function() {
styleguide = sg;
var sections = styleguide.section('*.'),
- i, sectionCount = sections.length,
- sectionRoots = [], currentRoot,
- rootCount, childSections = [],
- pages = {};
+ sectionCount = sections.length,
+ sectionRoots = [],
+ rootCount,
+ currentRoot,
+ childSections = [],
+ pages = {},
+ i;
console.log(sg.data.files.map(function(file) {
return ' - ' + file
@@ -188,7 +191,7 @@ process.nextTick(function() {
// Compile LESS/Stylus/CSS files into a single "style.css" if required
generateStylesheet = function(argv) {
var compilers = preCompiler.compilers,
- files
+ files;
console.log('...compiling additional stylesheets');
@@ -198,8 +201,8 @@ generateStylesheet = function(argv) {
if (!argv[key]) return;
return {
- files: Array.isArray(argv[key]) ? argv[key] : [argv[key]]
- , type: type
+ files: Array.isArray(argv[key]) ? argv[key] : [argv[key]],
+ type: type
};
});
@@ -208,8 +211,8 @@ generateStylesheet = function(argv) {
async.map(group.files, function (filename, next) {
- var type = group.type
- , extension
+ var type = group.type,
+ extension;
// Type-guessing for --style option
if (!type) {
@@ -320,9 +323,10 @@ jsonModifiers = function(modifiers) {
handlebars.registerHelper('ifAny', function() {
var numItems = arguments.length - 1,
options = arguments[numItems],
- success = true;
+ success = true,
+ i;
- for (var i = 0; i < numItems; i += 1) {
+ for (i = 0; i < numItems; i += 1) {
if (!arguments[i]) {
success = false;
break;
@@ -348,8 +352,9 @@ handlebars.registerHelper('section', function(reference, options) {
* @param {Mixed} query The section query
*/
handlebars.registerHelper('eachSection', function(query, options) {
- var sections,
- i, l, buffer = "";
+ var buffer = '',
+ sections,
+ i, l;
if (!query.match(/x|\*/g)) {
query = new RegExp('^' + query + '$|^' + query + "\\..*");
@@ -369,8 +374,9 @@ handlebars.registerHelper('eachSection', function(query, options) {
* Loop over each section root, i.e. each section only one level deep.
*/
handlebars.registerHelper('eachRoot', function(options) {
- var sections,
- i, l, buffer = "";
+ var buffer = '',
+ sections,
+ i, l;
sections = styleguide.section('x');
if (!sections) return '';
@@ -404,7 +410,9 @@ handlebars.registerHelper('whenDepth', function(depth, options) {
* @param {Object} section Supply a section object to loop over it's modifiers. Defaults to the current section.
*/
handlebars.registerHelper('eachModifier', function(options) {
- var modifiers, i, l, buffer = '';
+ var modifiers,
+ buffer = '',
+ i, l;
// Default to current modifiers, but allow supplying a custom section
if (options.data) modifiers = options.data.modifiers;

0 comments on commit 4325c87

Please sign in to comment.