Giter Club home page Giter Club logo

avalon2-mmrouter-starter's Introduction

avalon2-mmRouter-starter

基于司徒大神的轻量级MVVM框架avalon2.0搭建的一个简易的脚手架。

该脚手架是基于Mobx-React的脚手架Wukong修改而来。

采用了 avalon2.0 + webpack2 + mmRouter + HMR + dll + happypack等配置。

支持打包预览、打包性能分析、性能分析网页自动生成、dll文件优化等功能。

目前没有考虑IE9以下的兼容性问题。一度的纵容还不如割掉。

webpack command

  1. npm start 运行
  2. npm run build 生产环境打包
  3. npm run dll 运行dll配置文件,打一个dll包
  4. npm run redll 删除现有的dll文件,再重新打包
  5. npm run deploy 可发布的包,上线时建议用这个打包
  6. npm run preview 预览打包效果,需要cd ./dist 再执行。

how to run

git clone https://....
cnpm install | npm install...
npm run redll 

todos list

  1. 移动端
  2. IE9以下的兼容(不想做)
  3. 加入状态管理器
  4. 完善一个复杂的demo
  5. ...

notice

由于采用了dll配置优化,在发布上线的时候需要手动把build/dist/vendor.js拷贝到打出的dist/static/下。
同时需要修改入口文件index.html的引用地址。

<script type="text/javascript" src="/build/dist/vendor.js"></script> 生产环境下改成:
<script type="text/javascript" src="/static/dist/vendor.js"></script> 

thanks

司徒大神

author

波比小金刚

项目持续更新...

avalon2-mmrouter-starter's People

Contributors

cbbfcd avatar

Watchers

James Cloos avatar

Forkers

xuanzhaotech

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.