Newbie_小白
没有都对的别人,也没有全错的自己,至少要有自己的坚持,无关他人、无关外物!

一、命令行进入指定项目文件夹

二、相关命令安装环境和项目工具

1 npm init
2 
3 npm install react -- save
4 
5 npm install -g gulp
6 
7  npm install --save-dev gulp gulp-browserify gulp-concat gulp-react gulp-connect lodash reactify 

安装好了之后打开项目会多出node_modules文件夹和package.json文件以及package-lock.json文件,其中package.json文件内容如下:

{
  "name": "reactzh",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "gulp": "^3.9.1",
    "gulp-browserify": "^0.5.1",
    "gulp-concat": "^2.6.1",
    "gulp-connect": "^5.0.0",
    "gulp-react": "^3.1.0",
    "lodash": "^4.17.4",
    "reactify": "^1.1.1"
  }
}

三、安装bower

Bower是一个客户端技术的软件包管理器,它可用于搜索、安装和卸载如JavaScript、HTML、CSS之类的网络资源。其他一些建立在Bower基础之上的开发工具,如YeoMan和Grunt。

npm install -g bower

 

bower init

 

bower install bootstrap  --save

 

posted on 2017-11-01 14:20  Newbie_小白  阅读(330)  评论(0编辑  收藏  举报