Giter VIP home page Giter VIP logo

test's Introduction

 -D (--dev) 开发需要  -S (--save-dev) 开发上线都需要 也可以用yarn add 依赖模块 后面加dev就是开发需要 不加默认就是开发上线都学要
先初始化 npm init

webpack 相关
npm install webpack webpack-dev-server -D

babel 相关
npm install babel-core babel-loader babel-preset-es2015 babel-preset-stage-0 babel-preset-react css-loader style-loader less less-loader html-webpack-plugin file-loader url-loader -D

react 相关
npm install react redux react-redux react-router-dom react-dom  -S

bootstrap swiper -S



fetch 相关为了防止浏览器不兼容 如果不兼容whatwg-fetch会将fetch转成ajax,es6-promise解决promise兼容问题
 npm install es6-promise whatwg-fetch -D

后台用express
npm install express -S

scripts启动命令相关--progress有进度条--port启动的端口号
"start":"webpack-dev-server --port 3002 --open --progress --colors"

"build":"webpack -p" 打包压缩文件

目录结构
 -app 我们要写的文件都在这里
   -components 组件 傻瓜组件
   -containers 页面组件或者自己的subpage目录下
      -Home 首页文件夹
         -subpage 只能组件
         -index.js
      -List 列表页文件夹
      -MyCenter 个人中心文件夹
      -ShoppingCar 购物车文件夹
   -routers 文件夹定制了路由控制页面跳转


下载之后切换under分支

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.