Git Product home page Git Product logo

scaffold's Introduction

基于webpack 4.0 搭建的前端工作流

运行环境

  • node 6.x 以上版本
  • Mac OSX & Windows

目录结构如下

.
├── README.md
├── build
│   ├── .env
│   ├── config.js
│   └── ......
├── assets
│   ├── images
│   └── ...... 
├── dist   
│   
├── mock 
├── package.json
├── public
│   ├── favicon.ico
│   └── index.html
├── test
│
└── src
    ├── api
    ├── components  
    ├── pages
    │   └── index
    │       ├── actions
    │       ├── components
    │       ├── index.js
    │       ├── reducers
    │       └── store
    ├──  axios.config.js
    ├── main.js
    ├── index.less
    └── utils
      
       

结构释意

  • build webpack 配置
  • src 业务代码
    • api 请求
    • components 业务公用代码片段
    • pages/* 页面
    • utils 工具
  • assets/静态资源
  • public/*.html 项目html页 (默认单页应用为index.html )
  • mock/ mock数据

安装依赖

  • npm install

项目运行

  • npm run dev
  • npm run build
  • npm run test

支持创建工程

  • PC端 react + react-router + typescript + redux + antd
  • 移动端 react + react-router + redux
  • react + react-router + redux + 服务端渲染

辅助功能

  • mock数据
  • test 单元测试
  • 动态生成路由

说明

持续完善。

scaffold's People

Contributors

weiqing88 avatar

Watchers

James Cloos 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.