-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
This is the output of
|
Not sure why Travis is failing here, working fine in CircleCI |
@victorbjelkholm while you are this, can you alias |
process.stdout.write(msg) | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this just a console.log? All invisible logs should be through debug
(http://npmjs.org/debug)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost, it's console log with the ability of deciding if next message should go on a new line or not. Necessary for the generating keys message, which prints "done" after it's done.
@diasdavid Sure, I'll create the aliases in a different PR though. |
@@ -49,3 +49,15 @@ exports.getIPFS = (callback) => { | |||
exports.getRepoPath = () => { | |||
return process.env.IPFS_PATH || os.homedir() + '/.ipfs' | |||
} | |||
|
|||
exports.createLogger = (visible) => { | |||
return (msg, newline = true) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail on node 4 and 5, (default arguments are only supported in node 6)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I was sure that js-ipfs was compiled, even when used from node. Is that not correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do provide a compiled version when publishing do npm, but the tests run on node against the original source atm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the tests run against the compiled version that we distribute rather than the source we develop with? Anyways, I'll fix this but worth thinking about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you npm install it, you can use both versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, but require('ipfs')
would use the compiled version right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. And the tests in the browser do run against the compiled version
dd264a6
to
facf5ae
Compare
Shows exactly same information as go-ipfs except for change of the cmd + cat so `ipfs cat` turns into `jsipfs files cat` instead. Ref: issue #286
facf5ae
to
29c9793
Compare
Shows exactly same information as go-ipfs except for change of the cmd +
cat so
ipfs cat
turns intojsipfs files cat
instead. Ref: issue #286