PUTTING THE PANTS ON JAVASCRIPT
HOW WE CREATED A MONOREPO FOR OUR WEBS
Painpoints of multiple projects
• Setup phase of every repo
• Different deployments
• Code rots in old projects -
no one wants to touch
them
• No code sharing
• Updating dependencies
web-tools
tvadmin
editor
web-client
web-lab
!
The motivation
• We have a server monorepo
using Pants
• Same structure for every project
• Simpler workflow when working
in multiple services at once
• Updating one dependency
deploys all services
• Single setup, code sharing etc...
all the servers
in one repo
"
Implementation
all the webs
in one repo
"
• Pants Node contrib module
Inspired by Pants
• DEPENDENCIES.js
• JS scripts for task running
• CI scripts for selective
deployment
Implementation
all the webs
in one repo
"
• Pants Node contrib module
Inspired by Pants
• DEPENDENCIES.js
• JS scripts for task running
• CI scripts for selective
deployment
Implementation
all the webs
in one repo
"
• Pants Node contrib module
Inspired by Pants
• DEPENDENCIES.js
• JS scripts for task running
• CI scripts for selective
deployment
changedTargets.js
1. Creates dependency map of whole repo
2. Did service code change?
3. Did npm dependencies change?
4. Did shared code change?
Benefits
• Consistent code style - shared ESLint, Stylelint and Flow
configs
• Greenkeeper - All projects up to date at all times
• Code is sharable by default
• No bootstrap phase - just write code
• All boilerplate code sharable in a single place
• Super easy onboarding, try one project -> know them all!
#
Questions?
@arnarths

QuizUp Web Monorepo

  • 1.
    PUTTING THE PANTSON JAVASCRIPT HOW WE CREATED A MONOREPO FOR OUR WEBS
  • 2.
    Painpoints of multipleprojects • Setup phase of every repo • Different deployments • Code rots in old projects - no one wants to touch them • No code sharing • Updating dependencies web-tools tvadmin editor web-client web-lab !
  • 3.
    The motivation • Wehave a server monorepo using Pants • Same structure for every project • Simpler workflow when working in multiple services at once • Updating one dependency deploys all services • Single setup, code sharing etc... all the servers in one repo "
  • 4.
    Implementation all the webs inone repo " • Pants Node contrib module Inspired by Pants • DEPENDENCIES.js • JS scripts for task running • CI scripts for selective deployment
  • 6.
    Implementation all the webs inone repo " • Pants Node contrib module Inspired by Pants • DEPENDENCIES.js • JS scripts for task running • CI scripts for selective deployment
  • 8.
    Implementation all the webs inone repo " • Pants Node contrib module Inspired by Pants • DEPENDENCIES.js • JS scripts for task running • CI scripts for selective deployment
  • 10.
    changedTargets.js 1. Creates dependencymap of whole repo 2. Did service code change? 3. Did npm dependencies change? 4. Did shared code change?
  • 12.
    Benefits • Consistent codestyle - shared ESLint, Stylelint and Flow configs • Greenkeeper - All projects up to date at all times • Code is sharable by default • No bootstrap phase - just write code • All boilerplate code sharable in a single place • Super easy onboarding, try one project -> know them all!
  • 13.