node-dat-archive icon indicating copy to clipboard operation
node-dat-archive copied to clipboard

Add `localPathTemplate`

Open creationix opened this issue 8 years ago • 4 comments

Also creates target directory if it doesn't exist.

creationix avatar Jan 11 '18 22:01 creationix

Looking good! A few requests:

  • Can we put the localPathTemplate on DatArchive instead of passing it into create? You'd set the template by attaching the function to the class object. (If you're not comfortable with that we can add a class function like DatArchive.setOptions() to do it.)
  • Can you update the constructor to support the template fn?
  • Can you add the sodium dep explicitly to package.json? (Any reason not to?)
  • Can you document it in the readme?

Thanks!

pfrazee avatar Jan 12 '18 02:01 pfrazee

Can we put the localPathTemplate on DatArchive instead of passing it into create?

Yes, but then we'll need to move some logic out of create (like where it checks for the path).

Can you add the sodium dep explicitly to package.json?

Sure thing.

Can you document it in the readme?

Yes, I just wanted to get the API stable first.

creationix avatar Jan 12 '18 17:01 creationix

SGTM

pfrazee avatar Jan 12 '18 18:01 pfrazee

Sorry, I got sidetracked by linux tasks (need to get final image to factory soon and need a rock solid OTA update mechanism) I'll get back to this later.

creationix avatar Jan 15 '18 18:01 creationix