build-react-app

0.6.4 • Public • Published

To build a simple react app

创建简单的 React App

Features

- react
- redux
- react-redux
- react-router
- redux-thunk
- hmr
- fetch
- es6
- css modules
- scss
- postcss

Install

    1. npm install build-react-app -g
    2. build-react-app <directory>
    3. cd <directory>
    4. npm install

Usage

    1. npm run dev	代码热替换模式
    2. npm run build 	生产环境构建
    3. npm run serve	在服务器环境运行构建后的代码

Items

    ├─config            -- webpack 配置文件
    ├─src               -- 开发源文件目录
    │  ├─actions        -- actions	
    │  │  └─allActions	-- 存放各个组件的 action
    │  ├─components     -- 组件文件夹
    │  │  ├─Counter     -- Counter 组件
    │  │  └─Welcome     -- Welcome 组件
    │  ├─reducer        -- reducer
    │  │  └─allReducers -- 存放各个组件的 reducer
    │  ├─router         -- 路由文件
    │  └─store          -- store
    └─static            -- 静态资源文件

Tips

    1.如果没有生成脚手架文件,请试试以管理员身份运行
    2.生产环境没有配置 CSS 加载器,一律使用 SCSS,如必须使用 CSS,可修改后缀为 SCSS 或更改配置。

Readme

Keywords

none

Package Sidebar

Install

npm i build-react-app

Weekly Downloads

19

Version

0.6.4

License

ISC

Last publish

Collaborators

  • charleyloveslylla