Modularity
Making all the things their own thing
Overview
- First attempt
- Second attempt
- Keeping modules private
- Putting this to use
Idea One
Make everything its out repo and connect dependencies
Job-Queue Deps
- offload: the brain of job-queue
- env-settings
- name-badge-pdf-job
- team-account-type
- vm-multi-room-pdf-job
- vm-png-floor-job
- vm-email-pdf-job
- vm-multi-room-pdf-job
Offload Setup
- index.js
- package.json
- test/
- test/tests.js
- Readme.md
vm-Multi-room-pdf-job
- package.json
- index.js
- test/
- test/?
- Readme.md
Pains
- Updating package.json
- Finding bugs because you can't test
IDEA TWO
Make testable, reused components their own repo
Job Queue Deps
- offload
- env-settings
Job-Queue Jobs
Are only used in job queue so lets keep them in job queue
Isn't Offload Only for Job-queue?
Why make it its own repo?
How to keep private repos private?
Example Package.json
{
"NAME": "JOB-QUEUE",
"VERSION": "1.0.0",
"DEPENDENCIES": {
"OFFLOAD": "GIT+SSH://GIT@GITHUB.COM:ST/OFFLOAD.GIT#V0.4.1"
}
}
So? What are we doing with this?
Lets Break each app into its own repo
Api is a repo
App-dot is a repo
FPC is a repo
On-site is already its own repo
So many repos!
But wait, what about st_modules
If a module is used in two apps
make it its own repo
Right tests for it
Write a full readme
Anyone should be able to open the readme and use the module without looking at the code
Modularity
By Matthew Chase Whittemore
Modularity
- 1,412