2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-08 17:22:26 +03:00

add eslint, travis config, test tasks

This commit is contained in:
Nikolay Kostyurin
2018-06-11 22:31:02 +02:00
parent 305643daa2
commit 792e949b6e
36 changed files with 6529 additions and 434 deletions
+24
View File
@@ -0,0 +1,24 @@
'use strict';
const fs = require('fs');
const program = require('commander');
const version = require('../package.json').version;
program
.version(version)
.parse(process.argv);
function readFile(filename, encoding, callback) {
if (options.file === '-') {
// read from stdin
const chunks = [];
process.stdin.on('data', function (chunk) { chunks.push(chunk); });
process.stdin.on('end', function () {
return callback(null, Buffer.concat(chunks).toString(encoding));
});
} else {
fs.readFile(filename, encoding, callback);
}
}