added packages (monorepo)
What you think about monorepo with bitsharesjs-ws?
Can you please describe what the changes are that you are proposing?
We have two repo: bitsharesjs-ws and bitsharesjs.
I suggest create directory like packages in bitsharesjs repo with related bitsharesjs-ws package.
Why is it better:
-
easy to coordinate changes across modules. If we change
bitsharesjs-ws, we may test it onbitsharesjslib; - single place to report issues. One place for bugs, improvements and questions
- easier to setup a development environment. JS is changing, and development environment is changing too
This approach is called monorepo. Many projects use this approach (for example Vue or Babel)
Another thing what I suggest is create package bitshares-ecc. It is often necessary to work only with private keys. But use for that bitsharesjs impractical, because bitsharesjs too heavy package.
@sschiessl-bcp What do you think?
I've did some digging and found many projects building on -ws directly due to overhead of the full library.
How would that be handled in a mono-repo?
Guess we could add bitsharesjs-ws as a submodule repo ? so keep it separate but reference it in bitsharesjs as a subpart of it?
I've did some digging and found many projects building on -ws directly due to overhead of the full library.
How would that be handled in a mono-repo?
Do you mean fork or package dependence?
Monorepo is about source code, but in npmjs.com we will steel have two packages (bitsharesjs and bitsharesjs-ws)
If some project want to modify bitsharesjs-ws package they need fork all mono-repo. I think isn't big problem. Mostly forks bitsharesjs-ws repo is Graphene-based blockchain projects. They need fork bitsharesjs-ws and bitsharesjs repos. Old repo bitsharesjs-ws won't delete. Only will mark obsolete.
About submodule. It will not change anything. If people will want to create issue they won't understand where need to create.
I try to do monorepo in my btsdex library. You can see how it looks. We have 4 packages in npmjs.com: btsdex, btsdex-api, btsdex-ecc, btsdex-serializer. All this packages in one repo.
What packages do I suggest to make:
- api is for manage connection and call node methods.
-
ecc is for work with encryption, work with keys. It need when you want to create simple SPA for work with private keys, but you don't want to add fat
bitsharesjspackage. Or in your project you have backend who send transaction (because you need do some off-chain work), but users will sign this transaction.
What is your experience nowadays with monorepo?
What is your experience nowadays with monorepo?
very comfortable)
But today usually use lerna.js for that.
I would also divide this repository into several packages: chain, ecc, serializer, ws, and so on...