Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 8f757fb

Browse files
committed
minor cleanup
1 parent 49b77b4 commit 8f757fb

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

src/cli/commands/init.js

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const Command = require('ronin').Command
22
const IpfsRepo = require('ipfs-repo')
33
const Ipfs = require('../../core')
4+
const fsBlobStore = require('fs-blob-store')
45

56
module.exports = Command.extend({
67
desc: 'Initialize a local IPFS local node',
@@ -25,20 +26,14 @@ module.exports = Command.extend({
2526
},
2627

2728
run: (bits, force, empty) => {
28-
// TODO: what blob store do I use for browser? indexdb, right?
29-
// well, this IS cli, and there's no browser cli :P
30-
var someBlobStore = require('fs-blob-store')
31-
32-
// TODO: --force + --empty-repo will keep your default assets, right?
33-
// TODO: where to init at? $IPFS_PATH var? homedir/.ipfs otherwise? sounds like a helper method job
3429
const repo = new IpfsRepo('/tmp/my-little-repo', {
3530
stores: {
36-
keys: someBlobStore,
37-
config: someBlobStore,
38-
datastore: someBlobStore,
39-
logs: someBlobStore,
40-
locks: someBlobStore,
41-
version: someBlobStore
31+
keys: fsBlobStore,
32+
config: fsBlobStore,
33+
datastore: fsBlobStore,
34+
logs: fsBlobStore,
35+
locks: fsBlobStore,
36+
version: fsBlobStore
4237
}
4338
})
4439

@@ -52,9 +47,6 @@ module.exports = Command.extend({
5247
console.error(err.toString())
5348
process.exit(1)
5449
}
55-
56-
// TODO: what console output is desirable? any? mimick go-ipfs?
57-
console.log('res', res)
5850
})
5951
}
6052
})

0 commit comments

Comments
 (0)