无法使用Bootstrap 4 Alpha 2在grunt dist上加载grunt/sauce_browsers.yml

Sta*_*Kay 14 ruby bash twitter-bootstrap gruntjs

我正在尝试编译自定义版本的bootstrap v4 alpha2,但我一直遇到2个错误.请帮忙.我是红宝石的菜鸟.

我设法安装

$ gem install bundler
Run Code Online (Sandbox Code Playgroud)

实际上,bootstrap下没有.bundle目录

从/ node_modules/bootstrap运行以下命令失败

$ bundle install
Run Code Online (Sandbox Code Playgroud)

以下也失败了:

$ grunt dist


Loading "Gruntfile.js" tasks...ERROR
>> Error: Unable to read "grunt/sauce_browsers.yml" file (Error code: ENOENT).
Warning: Task "dist" not found. Use --force to continue.
Run Code Online (Sandbox Code Playgroud)

Ion*_*zău 1

正如@neilsimp1 评论的,解决方案似乎是删除bootstrap中的文件夹node_modules,克隆分支并在那里安装 Bootstrap:

# 1. Delete the bootstrap directory
cd node_modules
rm -rf bootstrap

# 2. Clone the repo
git clone https://github.com/twbs/bootstrap --depth 1

# 3. Switch to v4
cd bootstrap
git checkout v4-dev

# 4. Install and build
npm install
grunt dist
Run Code Online (Sandbox Code Playgroud)

(以 开头的行#是注释)