前面详细记录了安装node及git,接来下要安装bower,首先创建一个空文件夹bowerandgulp。
步骤:1、安装node.js 2、node里面自带了 npm 3、通过npm 安装cnpm 4、安装bower及相关依赖插件5、安装gulp
一、安装bower及相关内容步骤如下:
1、通过电脑左下角找到Git CMD,点击运行
cd可以找到下一目录,bower -v检查是否装了bower,我的是已经装好了。
若没有装可输入npm install -g bower 来全局安装bower
安装好了
2、安装bowerrc
这个安装可以在文件夹下右击找到 Git Bash here 点击运行,输入type null >.bowerrc
可看到对应文件夹里已经有了.bowerrc文件。
然后打开bowerrc文件,创建目录lib
3、安装 bower.json
在cmd 管理者身份运行,进入通过cd找到对应的文件夹后,运行bower init
4、通过bower安装其他插件如juqery 、bootstrap等
安装好后对应的文件夹下的lib里便会有下面插件。
二、安装gulp相关步骤:
1、全局安装gulp。输入npm install gulp -g,安装成功后可以输入gulp -v查看是否安装成功。
2、导入gulpfile.js后 ,输入npm init 安装package-lock.json和package.json
然后输入gulp,会提示需要安装的内容
输入npm install gulp wevserver安装
全部装好后