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

Submodule Structure #11

Closed
mappum opened this issue Sep 3, 2014 · 4 comments
Closed

Submodule Structure #11

mappum opened this issue Sep 3, 2014 · 4 comments

Comments

@mappum
Copy link

mappum commented Sep 3, 2014

I understand you want to modularize the project, but breaking up into a huge tree of git submodules is a little insane. Node already uses a module system by default, so we can put the same module structure you designed into directories. Each one as its own repo just makes the project a pain to maintain and to contribute to. If we move the modules into directories we will barely need to change the code, since the modules can still be loaded via require.

There are projects with similar scope/size, and they all work great with the standard Node way of organizing modules. (E.g. Dat, which I know you've contributed to).

Overall, the current structure adds painful management overhead, will likely scare off contributors, and doesn't provide anything over the built-in Node module system. Should I go ahead and refactor?

@mappum mappum mentioned this issue Sep 3, 2014
@jbenet
Copy link
Member

jbenet commented Sep 3, 2014

from irc:

gist is this: i <3 node, i <3 npm, i <3 modules, the only reason for the weird folder structure is that everything is changing so much simultaneously and in lock step. Re-publishing modules and reupdating dependencies is annoying. i had so much fun with that in a previous hyper modular project that i decided to just start this way and then break it out into own modules after closing in on something stable (see how they already have package.json's etc).

And, if it's not ipfs-specific, it should be its own module from the get-go and published separately (like node-multihash (npm) or node-multiaddr (npm)

a more general comment is that the node impl is really shitty right now. lots of people want to work on it, including @malandrew, and others. if we do a short sprint on cleaning it up, maybe dev on that could advance. but the tradeoff here is focus on the Go impl. i think i'd rather spend time shipping one alpha than two.

Adding to that: if there is enough interest from people, happy to do a short plan + sprint to clean this up. maybe interested people could come discuss on irc sometime this week?

@Latrasis
Copy link

Latrasis commented Feb 3, 2015

Hey Guys, is this the official repo? If so i'd be happy to help on reformatting to a more npm friendly structure. No git submodule voodoo magic.

There's two ways:

Seperate Repo way:

  1. Get rid of git submodules, don't need them.
  2. Seperate each submodule to a seperate repo and register to the npm registry.
  3. Then have node-ipfs as a seperate repo that fetches each module in package.json from npm.

Simple file.js Way:

  1. Get rid of git submodules, don't need them.
  2. Remove File List: /ipts-* to ipfs.js and rename submodules to lib
  3. Have just one package.json in index and have all node_modules automatically installed.

If you guys want to look at good example of a npm formats i know:
https://github.com/feross/webtorrent
https://github.com/sintaxi/surge
https://github.com/sintaxi/harp

Good Resources:
https://docs.npmjs.com/getting-started/creating-node-modules
https://docs.npmjs.com/getting-started/publishing-npm-packages

@Latrasis
Copy link

Latrasis commented Feb 3, 2015

In terms of a README alternative, using github's wiki is a good option.

@daviddias
Copy link
Member

Going to close this issue as it respects to the (waay waay) old js-ipfs :)

@Latrasis if you have free cycles to help ship js-ipfs, join the 🚢 ! :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants