Windows下搭建foundation apps环境

子车灿
2023-12-01
1 安装node.js
      1.1 安装最新版本(0.12.7),安装时请选中“add to path” 选项
      1.2 设置淘宝镜像,打开 cmd窗口,输入以下命令
                  npm config set registry= http://registry.npm.taobao.org/
                   npm config set loglevel=http

      1.3 打开cmd,窗口,输入npm -v 检查是否安装成功
2 安装Git
      2.1 设置Git环境变量,右击“我的电脑”->“属性”->"高级系统设置"->“环境变量”->“系统变量” 下找到path,加入git的安装目录
              C:\Program Files (x86)\Git\bin;
     2.2 打开cmd,窗口,输入git --version 检查是否安装成功
3 安装Python
    3.1 必须是2.7-3.0 之间的版本(本人安装的是python-2.7.10.amd64),安装时选中“add to path” 选项
    3.2 打开cmd,窗口,输入python 检查是否安装成功
4 安装Ruby(可选)
  4.1  设置淘宝源,打开cmd,
  1. gem sources --remove https://rubygems.org/  
  2. gem source -a http://ruby.taobao.org  
 
   4.2  这步骤是可选项,主要是安装Ruby后,webstorm可以添加个Watcher去编译Scss文件(参考 http://blog.csdn.net/zapzqc/article/details/42147519
5 创建Foundation Apps
  5.1 参考官方文档,该文档说要装Ruby,但实际上我没装Ruby,而是装了Python
  5.2 如果在安装node-sass出现问题时
            5.2.1 如果报错'libsass' bindings not found....使用rebuild命令:
              npm rebuild node-sass
             5.2.2  看到有github.com 字样时 多半是网络原因,删掉node-modules下的node-sass,重新执行npm install node-sass
 类似资料: