Git Product home page Git Product logo

granular-spa's Introduction

996.icu

granular-spa

微前端架构的一种实现形式————各个子项目独立打包、独立发布;也可独立启动、运行
支持全局store(暂不支持所有子项目互相暴露store)

项目目录结构

├── appMain           (主项目)
├── appHome           (子项目,路由: '' | '/home')
├── appVue            (子项目,路由:'/vue')
├── dist              (build生成出的静态资源目录,方便npm run start查看)
├── package.json      (依赖包)
└── readme.md         (说明文档)

版本记录

v0.2.0

新增内容
- 全局添加一个redux store,可全局访问,子项目注册方式见appHome项目
修改内容
- 修正一个single-spa-vue包引起的bug

v0.1.0

- 支持独立开发、独立编译打包。最终整合为静态资源启动整体或单个项目

操作命令

npm run install-all
- 加载所有子项目依赖

---

npm run serve-all
- 一键启动所有子项目(也可以自行独立启动单个项目)
- main项目端口 9000
- home项目端口 9100
- vue项目端口 9001

---

npm run build-all
- 一键编译打包所有子项目(也可自行独立编译打包单个项目)

---

npm run start
- 启动编译完后的整体项目,端口5000(需全局安装serve包,也可自行按照spa应用的启动方式)

常见问题

目前没人问问题

granular-spa's People

Contributors

jiangjazz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

granular-spa's Issues

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.