Git Product home page Git Product logo

san-demo's Introduction

这是百度san 框架的一个demo,也可以当作一个脚手架项目。其最大特点就是可以兼容到IE6。整个项目选用了webpack 4 来搭建,还是比较时髦的。

该demo 是按照大型项目的目标来搭建的。可以使用于大型的政府类项目。其技术实现包括:

  • webpack 4
  • san-router 路由
  • san-store 状态管理
  • san 单文件组件
  • 路由异步加载
  • 支持ES6语法

启动方式

 npm i
 npm start

命令说明

  • npm start //启动开发环境,IE8- 下测试无效。该模式下便于开发,支持自动编译和热加载
  • npm run start-ie //IE8 开发模式,一般用于IE8 下的调试, 不支持自动编译和热加载
  • npm run build //打包生产环境

由于webpack-dev-server 不支持IE8-,所以start-ie采用koa启动服务。启动后支持自动编译,但热加载自动刷新页面。简易项目开发时使用npm start启动,功能开发完成后用npm run start-ie启动在IE8-下进行调试。

可在config/config.js中设置端口和后端数据代理地址。

san-demo's People

Contributors

bingfengwx avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.