Giter VIP home page Giter VIP logo

umi-module-demo's Introduction

umi 实现模块化 demo。

说明

最下层工程:umi-bottom-common

写布局、登录、公共方法。

打成 npm 包供中间业务层使用

中间业务层:umi-middle-goods、umi-middle-order

依赖 umi-bottom-common($ npm install umi-bottom-common),使用 umi-bottom-common 提供的布局和登录认证相关的东东

中间层:只负责写业务模块功能。

可以单独部署到 nginx 使用

也可以打成 npm 包供最上层集成项目使用

最上层集成项目:umi-top-integration

最上层:负责组装中间业务层。需要用到什么业务功能,就引用对应的中间业务层。

甲公司只要订单业务:$ npm install umi-middle-order

乙公司只要商品业务:$ npm install umi-middle-goods

丙公司要订单业务和商品业务:$ npm install umi-middle-order umi-middle-goods

启动

$ npm run bootstrap

安装依赖包,漫长的等待......

适用场景

同时维护很多个后管系统。每个后管系统都有些公共的模块,比如:用户管理页面。

现在用户管理页面需要新增个字段,传统做法是用到它的所有后管系统都需要手动改一波代码,想想就痛苦。

模块化解决该问题:只需将中间业务层的用户管理页面修改完成后发布新的 npm 包,用到它的项目敲一个 npm install user@latest 即可。

umi-module-demo's People

Contributors

dkvirus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.