【即将关站通知●已关闭注册功能】,倒计时剩余:计算中...

编译 Bootstrap 4.0 的坑


Bootstrap 4 Alpha 了6个版本,beta 了2个版本,拖的时间太长了,一直在跟进,最近又尝试编译了一下,发现还是坑多,记录下,前人踩坑,后人乘凉。

中文网站基本不用看了,因为更新太快,版本都落后,直接看英文官网吧。

官网:https://getbootstrap.com/

下载: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


cacert.pem

gem 相关命令:


gem  sources  --add  https://gems.ruby-china.org/  --remove  https://rubygems.org/
gem  sources  -l

sudo  gem  clea
sudo  gem  install  foundatio
sudo  npm  install  -g  bower  grunt-cl
sudo  npm  instal
grunt  buil
grunt  /  grunt  serve  /  grunt  watch


最近编译  bootstrap  4  beta2  又碰到坑了。
首先是  ruby  的库文件下载一半锁住后,一直没法继续,需要手工删除一下。
rm  /c/ruby32/xxxx/xxx.gem

然后是  npm  install  bootstrap-4@beta-2    的版本有问题,改为  git  clone  后解决了。
git  clone  --depth=1  https://github.com/twbs/bootstrap.git
cd  bootstrap
npm  install
bundle  install
npm  run  dist

命令顺序如下:但是几乎每步一坑


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.s3.amazonaws.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe

解压到  C:/ruby_devkit
配置  conf.yaml
-  C:/Ruby23

cd  c:/ruby_devkit
运行  ruby  dk.rb  install



https://github.com/beefproject/beef/issues/1387


收藏 邀请

路过

雷人

握手

鲜花

鸡蛋


最新评论

热门资源

最新发布

魔趣广告

在线支持
关闭
欢迎来到魔趣吧
如果你有建站技术问题、仿站需求、模板插件修改需求,请联系我们的技术支持!高效率,低价格的帮你搞定!
请认准魔趣吧唯一官网:www.moqu8.com,谨防假冒网站!

一般问题请到【求助区】发帖咨询(免费)!

邮箱咨询:
winkill2012@qq.com

邮箱咨询需注明:资源地址+本站用户名+具体问题,三者缺一不做处理。非本站资源不处理!
在线支持

关于魔趣吧|魔趣建站

魔趣吧,志在打造全国最大的建站资源共享平台。 本站提供海量免费的建站资源,包括WordPress模板、Discuz精仿模板、PHPWind模板、phpcms模板、Discuz精仿插件、帝国cms模板、织梦模板等上万精品模板!同时,提供各种建站素材、JS特效、整站程序源码!
服务中文站长,传播分享精神!建站,就来魔趣吧!!
2015-2024 魔趣吧 ( 豫ICP备2021024354号 )   豫公网安备41030402000182号 百度统计
HTTPS安全认证
|网站地图 | 已运行:天 
温馨提示:本站所有资源、教程、源码,不得用于非法站点及用途,否则,本站将终止提供任何服务! Powered by Discuz! Licensed