Eugeny / tabby

A terminal for a more modern age
https://tabby.sh
MIT License
58.27k stars 3.36k forks source link

Question - about repo structure - enhancement perhaps? #2334

Closed cliffordfajardo closed 3 years ago

cliffordfajardo commented 4 years ago

Hey @Eugeny I've been using terminus for the past few weeks and I love! I've also been learning the codebase so I can start making my own addons

I noticed the terminus repo is structured like a mono repo, where you have packages split out nicely. For example:

app/
terminus-core
terminus-plugin-manager
terminus-serial
.....

Have you considered using yarn's native feature called "workspaces"? It would eliminate quite of few of the build scripts and build specific code simply adding 1 additional properties to your package.json

"workspaces": [
  "terminus-core",
  "terminus-plugin-manager",
  "terminus-serial"
   ...
], 

Yarn workspaces handles all the symlinking between modules.

terminus
├── terminus-terminal
 │   ├── index.js
 │   └── package.json
├── node_modules
 │   ├── terminus-terminal -> ../terminus-terminal
 │   └── termius-core -> ../terminus-core
├── terminus-core 
 │   ├── index.js
 │   └── package.json
├── package.json
└── yarn.lock

I recently found myself implementing a similar repo structure as yours for a work project, which led to look at yarn workspaces.

cliffordfajardo commented 4 years ago

Also, is there a discord chat server or anything similar for this project for collaboration/questions purposes?

Thanks!

Eugeny commented 4 years ago

I'm definitely open to improvements! There's some webpack glue magic in place to avoid listing common dependencies six times, and due to the plugin loading logic it's critical that Angular modules only exist once in app/node_modules and not terminus-*/node_modules. Another thing is there's a bunch of native module compilation involved in the build process and I'm not sure yet how Yarn 2 handles that given that the toolchain (node-gyp, electron-rebuild etc.) expect a node_modules folder.

In short, if you can pull this off, I'd love to merge!

Eugeny commented 4 years ago

As for communication, there'a Gitter chatroom (link in the README)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks unless you comment. Thank you for your contributions.