Bootstrap 4 Alpha 了6个版本,beta 了2个版本,拖的时间太长了,一直在跟进,最近又尝试编译了一下,发现还是坑多,记录下,前人踩坑,后人乘凉。 下载:https://getbootstrap.com/docs/4.0/getting-started/download/ 建议用 git clone 的方式。 编译:https://getbootstrap.com/docs/4.0/getting-started/build-tools/ 需要安装 node, ruby,会用到 npm gem 包管理方式,吐槽下,一个项目管理搞这么多语言合适么?我认为 node 完全能胜任。然后你最好能翻墙,否则很有可能会卡死。 1. 强烈推荐使用以下 node npm 版本: node -v # 版本 6.11 npm -v # 版本 5.2 npm install npm@5.2 (npm 5.3 会有各种坑) 2. npm install bootstrap@4.0.0-beta 没有 Gem 文件,需要直接从 git 下载: git clone https://github.com/twbs/bootstrap.git 3. npm 慢如死牛,设置源: npm config set registry https://registry.npm.taobao.org 4. ruby 设置源,首先要下载证书,放到 C:\Ruby23\cacert.pem set SSL_CERT_FILE=C:\\Ruby23\\cacert.pem 5. 设置 ruby gem 源: gem sources --remove https://rubygems.org/ gem sources -a https://ruby.taobao.org/ gem sources -l 备用:https://gems.ruby-china.org/ bundle config mirror.https://rubygems.org https://gems.ruby-china.org 6. 管理员启动 cmd 7. 重新编译部分模块: npm rebuild node-sass npm cache clear --force npm install bundle install npm run dist gem 相关命令: gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ sudo gem clea 最近编译 bootstrap 4 beta2 又碰到坑了。 命令顺序如下:但是几乎每步一坑 git clone https://github.com/twbs/bootstrap.git cd bootstrap/ npm install gem install bundler bundle install npm run dist npm test npm run docs 最新的坑: Ruby 大垃圾需要什么 DevKit https://github.com/beefproject/beef/issues/1387 |