Skip to content

Commit

Permalink
Merge pull request #22 from tfrommen/feature/clean-up
Browse files Browse the repository at this point in the history
General clean-up.
  • Loading branch information
MohammadYounes committed Feb 15, 2015
2 parents 0e85e33 + 3130721 commit 649ad56
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions bin/rtlcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var path = require('path'),
;

var input, output, directory, ext,
config, silent, currentErrorcode,
config, currentErrorcode,
arg, args = process.argv.slice(2),
shouldBreak = false
;
Expand Down Expand Up @@ -269,4 +269,4 @@ if (input != '-') {
process.stdin.on('end', function() {
processCSSFile(false, buffer);
});
}
}
6 changes: 3 additions & 3 deletions lib/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function main(options, rules, declarations, properties) {

if (!options)
options = {}
options = {};

function optionOrDefault(option, def) {
return option in options ? options[option] : def;
Expand Down Expand Up @@ -31,7 +31,7 @@ function main(options, rules, declarations, properties) {
options: { scope: urlFlag ? '*' : 'selector', ignoreCase: false }
});

urlFlag = optionOrDefault('swapLtrRtlInUrl', true)
urlFlag = optionOrDefault('swapLtrRtlInUrl', true);
if (!config.stringMap.some(function (map) { return map.name == 'ltr-rtl'; }))
config.stringMap.push({
'name': 'ltr-rtl',
Expand All @@ -40,7 +40,7 @@ function main(options, rules, declarations, properties) {
options: { scope: urlFlag ? '*' : 'selector', ignoreCase: false }
});

urlFlag = optionOrDefault('swapWestEastInUrl', true)
urlFlag = optionOrDefault('swapWestEastInUrl', true);
if (!config.stringMap.some(function (map) { return map.name == 'west-east'; }))
config.stringMap.push({
'name': 'west-east',
Expand Down
2 changes: 1 addition & 1 deletion lib/decl.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function main(configuration) {
if (config.preserveComments)
decl._value.raw = decl._value.raw.replace(this.replace, newValue + (config.preserveDirectives ? directive : ""));
else
decl.value = decl._value.raw.replace(this.replace, newValue);;
decl.value = decl._value.raw.replace(this.replace, newValue);
return true;
}
},
Expand Down
6 changes: 2 additions & 4 deletions lib/rtlcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@
if (config.autoRename && flipped == 0) {
rule.selector = util.applyStringMap(rule.selector, true, false);
}

return;
});

//loop @ rules
Expand Down Expand Up @@ -134,7 +132,7 @@
*/
exports.process = function (css, options, rules, declarations, properties) {
return new RTLCSS(options, rules, declarations, properties).process(css).css;
}
};

/**
* Creates a new instance of RTLCSS using the passed configuration object
Expand All @@ -146,7 +144,7 @@
exports.configure = function (config) {
config = config || {};
return new RTLCSS(config.options, config.rules, config.declarations, config.properties);
}
};

module.exports = exports;

Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function main(configuration) {
return 100 - parseFloat(num, 10);
});
}
}
};
return util;
}
module.exports.configure = main;

0 comments on commit 649ad56

Please sign in to comment.