GithubHelp home page GithubHelp logo

redtmp / create-react-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wx-chevalier/web-examples

0.0 1.0 0.0 11.82 MB

面向React+Redux+Webpack的单项目多应用脚手架

Home Page: https://github.com/wxyyxc1992/create-react-boilerplate

JavaScript 97.40% HTML 2.07% Shell 0.32% CSS 0.20%

create-react-boilerplate's Introduction

基于 React 技术栈的前端工程项目模板

本仓库包含两个部分,一个 create-react-boilerplate,是用于构建 React 及其技术栈项目的脚手架。另一个是完整的多应用模板项目,顺便包含详细的从零到一的 React 及其技术栈使用教程

create-react-boilerplate: 面向 React 技术栈的工程项目脚手架

最近笔者在逐步将之前的项目升级为 Webpack2 + ReactRouter4,同时优化 MobX/Redux 搭配的状态管理模式,以及将通用组件抽取到 React Storybook 中切向所谓组件驱动开发。对于其中浅薄的工程化的思考可以参考2016-我的前端之路:工具化与工程化,对于模板中配置的详解参考详细的从零到一的 React 及其技术栈使用教程],这也是笔者当前仓库中另一个主要内容。 言归正传,笔者最近团队中项目在逐步增多,特别是有很多小的需要快速搭建的项目;由于人员素质相对参差,并且技术包括实践衍化过快,笔者就花了几小时参考了 create-react-appWebpack2-Boilerplate 封装了一下。目前存在大量的问题,预定的四个模式中也只完善了最基本的纯 React 应用,欢迎大家提出指导或者有什么觉得不错的特性。

可以直接使用 npm 或者 yarn 安装:

npm install create-react-boilerplate -g

基本使用方式类似于 create-react-app,直接创建项目:

其支持四个模板类型:

  • pwa:侧重 React,React StoryBook, ReactRouter4
  • mobx:侧重 mobx
  • redux:侧重 redux
  • full:侧重完整的工程项目
create-react-boilerplate app

create-react-boilerplate 并没有负责安装依赖,项目创建之后切换到项目目录,执行sh ./install.sh安装依赖,包括:

#!/usr/bin/env bash
npm install --global yarn
yarn install #安装本地package.json中依赖
yarn global add flow-bin #全局安装flow类型检查工具
yarn global add cnpm-check #全局安装npm-check
yarn global add babel-cli #全局安装Babel CLI命令行工具
yarn global add weinre #全局安装调试工具

安装完毕后执行npm start即可进入开发模式,关于这里的几个构建目标可以参考详细的从零到一的 React 及其技术栈使用教程

create-react-boilerplate's People

Contributors

wx-chevalier avatar

Watchers

 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.