Skip to content

Commit

Permalink
try to use bin & let's go to office :crying::crying:
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed May 24, 2016
1 parent 994c9ab commit a475f71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion bin/solutions.js
@@ -1,3 +1,5 @@
#!/usr/bin/env node
var solutions = require('../dist/');

console.log('solutions');
console.log(solutions);
solutions('dist', 2);
7 changes: 3 additions & 4 deletions lib/index.js
Expand Up @@ -66,12 +66,12 @@ function writeFile(path, file) {
var writeFileObs = Rx.Observable.create(function (observer) {
fs.open(path, 'wx', function (err, fd) {
if (err) {
console.log("--------------------");
console.log('--------------------');
console.log(err);
}
fs.close(fd, function (err) {
if (err) {
console.log("--------------------");
console.log('--------------------');
console.log(err);
}
});
Expand Down Expand Up @@ -150,7 +150,7 @@ function parseFileObs(file) {
});
}

function generate(dir, length) {
export default function generate(dir, length) {
var solutions = [];
var count = 1;
var onNext = function (res) {
Expand All @@ -177,4 +177,3 @@ function generate(dir, length) {
return fileAndContents;
}).subscribe(onNext, null, onCompleted);
}
generate('dist', 2);
2 changes: 2 additions & 0 deletions test/index.js
@@ -1,6 +1,8 @@
import assert from 'assert';
import solutions from '../lib';

describe('solutions', function () {
solutions('dist', 2);
it('should have unit test!', function () {
assert(true, 'we expected this package author to add actual unit tests.');
});
Expand Down

0 comments on commit a475f71

Please sign in to comment.