GithubHelp home page GithubHelp logo

react-cli's Introduction

react-ve

一个让你快速搭建react开发环境的脚手架

优化项

  1. 代码丑化压缩
  2. 代码分割(code-splitting) 模板使用基于路由的动态导入
  3. 使用 DLL 将公用依赖库模块封装为一个独立文件

安装及使用

  1. npm install react-ve -g
  2. react-ve init [projectName]

启动项目

  1. cd [projectName]
  2. yarnnpm install
  3. npm run dll
  4. npm start

在浏览器地址栏中输入:localhost:3000即可访问

项目打包,运行npm run build即可,项目将打包至dist文件夹内

默认使用技术栈:
  1. react
  2. typescript
  3. antd
  4. styled-components
  5. react-router-dom
  6. immutable

你可以根据喜好来installuninstall它们。


建议:

项目公共样式(包括antd、框架、装饰页)使用less,页面级样式采 用styled-components,以防止样式污染。


DLL :

webpack.dll.config.babel.js中,默认打包的公共包包括:

entry: {
    vendor: ['react', 'react-dom', 'antd', 'react-router-dom', 'immutable']
  }

你可以根据自己的喜好做删减

react-cli's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

daodaow qwe917102

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.