Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
remixz committed Dec 7, 2013
1 parent fb5cf36 commit bbf0a71
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bin/dogescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ var beautify = require('js-beautify').js_beautify;
var parser = require('../lib/parser');

if (argv._[0]) {
var file = fs.readFile(path.resolve(process.cwd(), argv._[0]), {encoding: 'utf-8'}, function (err, script) {
var lines = script.split(/ {3,}|\n/);
var output = '';
var file = fs.readFile(path.resolve(process.cwd(), argv._[0]), {encoding: 'utf-8'}, function (err, script) {
var lines = script.split(/ {3,}|\n/);
var output = '';

for (var i = 0; i < lines.length; i++) {
output += parser(lines[i]);
}
for (var i = 0; i < lines.length; i++) {
output += parser(lines[i]);
}

if (argv.beautify) process.stdout.write(beautify(output))
else process.stdout.write(output);
});
if (argv.beautify) process.stdout.write(beautify(output, {break_chained_methods: false}))
else process.stdout.write(output);
});
} else {
// streamy inheritance stuff
// boilerblate from the docs
Expand Down

0 comments on commit bbf0a71

Please sign in to comment.