angularjs - How to build multiple applications from a single code base in Angular -


i'm working on angular application. based our application on https://github.com/swiip/generator-gulp-angular , working fine. angular seed project scans js files in directory , concats them single js file when go production.

we're building admin backend billing system. client wants "public backend" clients. place clients , log in , send messages basically. ui same public backend, re-use same directives everywhere. problem public backend tiny , admin backend huge. don't think serving full admin app random client practice.

how go building 2 applications same code base?

don't serve 2 applications same codebase. recipe disaster. rough outline of how handle this:

  1. audit application have built. identify components reusable between 2 projects , establish base project project.
  2. if built things modularity in mind, shouldn't back-braking. may need refactor right position. john papa's angular styleguide great place on front (it's been great i've learned angular).
  3. turn base front-end project bower dependency updated independently of custom application code. more on creating bower package here. maybe open-source you've built?!?
  4. build custom functionality on top of modularized base build. each group of custom functionality 1 of applications (in case sounds admin panel , public app).
  5. post launch, manage apps 1 product team if same. identify features common, build them base app , deploy changes via bower 2 custom apps. add in custom functionality on per-project basis; if codebases diverge enough, separate 2 product teams.

as noted others, manage apps build tool grunt/gulp pull in common dependencies you.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -